OdooWiki OCA HUB

Product Margin and Margin Rate

product_standard_margin folder_open OCA/margin-analysis open_in_new
Product License: AGPL-3

Add 2 fields on the product form that compute the standard (or theorical) margin and markup based on the current values of sale and standard price present in the product form. We take care of taxe included or excluded.

It will just compute it as follow: Margin : (Sale Price without tax - Standard Price) / Sale Price without tax Markup : (Sale Price without tax - Standard Price) / Standard Price

Note:

As this module will base his simple computation on sale and cost prices, it suppose you have them both in the same currency (the price type must of the same currency for both of them). Remember this is the default OpenERP configuration (price type of all product price fields are set as the same as the company currency). We don't take care of it cause otherwise we should have added a dependency on sale module.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Shows the margin, margin rate and markup rate directly on the product form and product list, calculated from the sale price (tax excluded) and the cost price you enter.

This module adds four calculated values to products, both on the product template and on each product variant: Sale Price VAT Excluded, Margin, Margin on Sales (%) and Markup Rate (%).

On the product form, the Margin, Margin on Sales (%) and Markup Rate (%) appear right after the cost price field. The Margin is shown as an amount, while the two rates are shown as percentage pies. On the product list, the same three columns are available but hidden by default, so you can switch them on when needed.

The values are recalculated automatically whenever the sale price, the cost price or the product's taxes change. The sale price used is the one without tax, so if your sale price includes tax, the module converts it first. Margin is the sale price without tax minus the cost price. Margin on Sales (%) is the margin divided by the sale price without tax. Markup Rate (%) is the margin divided by the cost price.

Special cases: if there is no sale price, the margin is negative and the margin rate shows 999.0; if there is no cost price, the markup rate shows 999.0. On product templates that have several variants, these three values are hidden on the template itself, because each variant can have its own prices.

Depends on

account
Models and fields (2)
  • product.product · extends an existing modelstandard_margin (Margin), list_price_vat_excl (Sale Price VAT Excluded), standard_margin_rate (Margin on Sales (%)), standard_markup_rate (Markup Rate (%))
  • product.template · extends an existing modelstandard_margin (Margin), list_price_vat_excl (Sale Price VAT Excluded), standard_margin_rate (Margin on Sales (%)), standard_markup_rate (Markup Rate (%))

Text generated by AI (DeepSeek) from reading the Odoo 19.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-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 6 confirmed, 3 with no information of 9 versions.

Sources · Odoo 12.0

Confirmed on 2026-11-03 in branch 12.0 of OCA/margin-analysis.

terminal Installation and usage

No verified information

Installation 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.

info

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.