Adds a helper function _get_price() on product.product to compute the product price based on pricelist, fiscal position, company and date.
The method returns a dict such as:
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Adds a technical helper on products that calculates a product's unit price from a pricelist, fiscal position, company and date, including tax handling and discount information.
This module does not add any new screen or menu. It adds a single technical helper method, _get_price, on the product model product.product, meant to be called by other modules or customisations.
When called, it returns a small result containing the unit price, whether taxes are included, and, when a pricelist applies a discount, the original price and the discount percentage.
- It can take a quantity, a pricelist, a fiscal position, a company and a date, so the same product can be priced differently depending on who buys it, when, and in which company.
- If no pricelist is given, it falls back to the product's sales price.
- Taxes are taken from the product, filtered by company, and mapped through the fiscal position if one is provided.
- Prices are rounded using Odoo's "Product Price" decimal precision, and discounts use the "Discount" precision.
- When the pricelist rule is set to show discounts, it computes the original price and the discount percentage; otherwise it returns the price with no discount.
It touches product.product, product.pricelist, product.pricelist.item, account.tax and decimal.precision. Demo data creates example taxes, fiscal positions and a pricelist, but these are only for testing.
Depends on
Models and fields (1)
- product.product · extends an existing model
Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 2 confirmed, 7 with no information of 9 versions.
Sources · Odoo 18.0
Confirmed on 2026-11-03 in branch 18.0 of OCA/product-attribute.
terminal Installation and usage
No verified informationInstallation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.