OdooWiki OCA HUB

Product Margin Classification

product_margin_classification folder_open OCA/margin-analysis open_in_new
Account License: AGPL-3

This module is designed to extend Sale Price computation in Odoo.

This module add a new model 'Margin Classifications' linked to Product variants.

A margin classification has a 'Profit Margin' field and extra fields to manage computation method, like in Pricelist Item model (Markup Rate, Rounding and Surcharge fields)

This module use both Markup) and Profit Margin concepts.

You could be interested by native Pricelist functionalities, setting sale prices based on Cost prices. The main problem of this design is that sale price change automaticaly when cost price changes, that is not desired in some user cases. For exemple, if you have a shop, you want to changes sale prices when customers is not in the shop, and after having changed labels in the shop.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Create margin classifications that define a target sale price from cost, markup, rounding and surcharge, then see which products are priced correctly, too cheap or too expensive and update their sale prices in one click.

This module adds a new concept called Margin Classification, used to check and adjust the sale prices of your products based on their cost.

You create classifications under Sales > Configuration > Margin Classifications. Each one has a name, a Markup percentage, a Profit Margin percentage (the two are linked: changing one recalculates the other), a Price Rounding value and a Price Surcharge. A company can be set, and each classification is restricted to its company.

On each product (or product template with a single variant) you can choose a Margin Classification. Odoo then computes a Theoretical Price from the cost, the markup, the rounding and the surcharge, taking included taxes into account. The product is flagged as Correct Margin, Too Cheap or Too Expensive by comparing the theoretical price with the current sale price, and the difference is shown.

On the product form and list you get buttons to increase or decrease the sale price up to the theoretical price, and list-view actions to apply it to many products at once. The classification form shows counters of products and buttons to apply the theoretical price to all incorrect, too cheap or too expensive products.

Products can be filtered by classification and margin state in the product search view.

Depends on

sale

Menus it adds

menu_product_margin_classification
Models and fields (3)
  • product.product · extends an existing modelmargin_state (Theoretical Price State), theoretical_price, theoretical_difference, margin_classification_id (Margin Classification)
  • product.template · extends an existing modelmargin_state (Theoretical Price State), theoretical_price, theoretical_difference, margin_classification_id (Margin Classification)
  • product.margin.classification · new modelname, markup, company_id (Company), price_round (Price Rounding), product_ids (Products), product_qty (Products Quantity), profit_margin, price_surcharge, product_too_cheap_qty (Total Products Too Cheap), product_correct_price_qty (Total Products With Correct Price), product_too_expensive_qty (Total Products Too Expensive), product_incorrect_price_qty (Total Products With Incorrect Price)

Text generated by AI (DeepSeek) from reading the Odoo 16.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: 2 confirmed, 7 with no information of 9 versions.

Sources · Odoo 16.0

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

terminal Installation and usage

OCA documentation · Odoo 16.0
  • Go to : 'Sale > Configuration > Products > Margin Classifications
  • Create new classifications
  • Set classification to your products

On the Margin classification Form, user can change computation fields. (Margin, Rounding method, ...) Three buttons are available to apply theoretical prices:

  • to all products,
  • only for products that are too expensive
  • only for products that are too cheap

By clicking on the smart buttons on the right part of the form, all the products will be displayed, and user can easily change prices

User can also see easily products with incorrect margins in the margin classification tree views:

If product has a margin classification defined and the theoretical price is not the same as the sale price, an extra field 'Theoretical Price' is displayed, based on the Margin Classification and a button is available to change sale price.

No verified information in OCA: Installation.

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.