OdooWiki OCA HUB

Sale Price Compliance

sale_price_compliance folder_open OCA/sale-workflow open_in_new
Sales/Sales License: LGPL-3

This module extends the sales pricing functionality to display a color code based on the price at which products are being sold.

Managing Price Compliance Thresholds can be done by adding Manage Price Compliance group to any user. Compliance Tiers can be filtered on sale reports.

You can use up to 3 different price compliance tiers for products, categories or for all company.

You can customize the texts and icons of the tiers via the System Parameters.

Labels of the tier fields will change according to sale_price_compliance.price_compliance_selection_tiers_text System Parameter in views.

This functionality only applies to Sales.

A sale with a line with Non Compliant price (doesn't fit in any defined tiers) can't be confirmed. Only Sale Administrators can validate this sales and a message will be posted.

Price Compliance thresholds are selected in this order: Product > Product Category > Company

Each Tier represents the maximun discount applied to the Price of the Product to achieve the target tier.

Color Compliance Tiers

  • Tier 1 🟩: High-yield (Fully compliant)
  • Tier 2 🟨: Medium-yield (Moderately compliant)
  • Tier 3 🟧: Low-yield (Low compliant)
  • Non Compliant 🟥: Non Compliant price (blocked)
  • Pricelist 🟦: Pricelist has been used and it's price is between pricelist and last compliant tier.

Information Display on Price Compliant Tiers Includes a popup to display detailed information about the price ranges within each price compliance tiers.

Also displays Product Base UoM and Product List Price in Sale Currency in the Top Right corner of the Popup.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Shows a colour-coded price compliance tier on each sale order line, based on discount thresholds set per product, product category or company. Orders containing non-compliant prices cannot be confirmed unless the user is a Sales Administrator.

This module adds a visual price compliance indicator to sales order lines. For each line, Odoo compares the unit price after discount (converted to the product's base unit of measure) with up to three discount thresholds. The result is shown as a coloured icon (green, yellow, orange, red or blue) in the order form, list and kanban views, and in the sale order line list. Clicking the icon opens a popover showing the discount and price range of each tier.

Thresholds can be defined at company level in Sales settings, on product categories, and on products. The most specific setting wins: product first, then category (including parent categories), then company. Thresholds must be positive, not exceed 100%, and have no gaps.

When a user tries to confirm an order containing a line with a non-compliant price, Odoo blocks the confirmation with an error message. Users belonging to the Sales Administrator group can confirm anyway, and a message is posted on the order.

A new user group 'Manage Price Compliance' controls who can see and edit the threshold fields. The compliance tier is also available as a column and a group-by filter in the Sales Analysis report. Tier labels and icons can be customised through system parameters.

Depends on

sale
Models and fields (10)
  • sale.order · extends an existing model
  • res.company · new model
  • sale.report · extends an existing modelprice_compliance_tier
  • product.product · new model
  • sale.order.line · new modelprice_compliance_data, price_compliance_tier
  • product.category · new model
  • product.template · new model
  • res.config.settings · extends an existing modelprice_compliance_threshold_t1, price_compliance_threshold_t2, price_compliance_threshold_t3, use_price_compliance_threshold
  • product.price.compliance.threshold.tier.mixin · new modelprice_compliance_tier
  • product.price.compliance.threshold.config.mixin · new modelprice_compliance_threshold_t1 (Tier 1), price_compliance_threshold_t2 (Tier 2), price_compliance_threshold_t3 (Tier 3), use_price_compliance_threshold (Use Price Compliance Thresholds)

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: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 16.0

Confirmed on 2026-11-03 in branch 16.0 of OCA/sale-workflow.

terminal Installation and usage

OCA documentation · Odoo 16.0

To use this module, you need to:

Configure Parameter Text: Change the default price compliance tiers texts

  • Go to System Parameters.
  • Create a new parameter with key sale_price_compliance.price_compliance_selection_tiers_text.
  • Write a dictionary with the values for tiers that you want to change it's default text.
  • Save the parameter.
  • Create a new parameter with key sale_price_compliance.price_compliance_selection_tiers_icon.
  • Write a dictionary with the values for tiers that you want to change it's default icon.
  • Save the parameter.

Example:

Param sale_price_compliance.price_compliance_selection_tiers_text:

{'t1': 'Gold', 't2': 'Silver', 't3': 'Bronze', 'pricelist': 'Draw'}

Param sale_price_compliance.price_compliance_selection_tiers_icon:

{'t1': '🥇', 't2': '🥈', 't3': '🥉', 'non_compliant': '⛔️', 'pricelist': '🤝'}

Resulting texts and icons will be:

  • Gold: 🥇
  • Silver: 🥈
  • Bronze: 🥉
  • Non Compliant: ⛔️
  • Draw: 🤝

Available keys to be used in the dictionary are:

  • t1: Tier 1
  • t2: Tier 2
  • t3: Tier 3
  • non_compliant: Non Compliant
  • pricelist: Pricelist

Configure: Product Price Compliance Thresholds configuration

  • Go to Sales > Products > Products > Select one > Sales tab
  • Enable Use Price Compliance Thresholds under Sale Price Compliance Thresholds
  • Fill from 1 to 3 tiers that you want to use in this product.

Example: Tier 1: 10%, Tier 2: 20%, Tier 3: 30%. (Use all tiers)

Configure: Product Category Price Compliance Thresholds configuration

  • Go to Sales > Configuration > Products > Product Categories > Select one
  • Enable Use Price Compliance Thresholds under Sale Price Compliance Thresholds
  • Fill from 1 to 3 tiers that you want to use in this category.

Example: Tier 1: 15%, Tier 2: 25%, Tier 3: 0%. (Don't use tier 3)

Configure: Company Price Compliance Thresholds configuration

  • Go to Sales > Configuration > Settings
  • Enable Use Price Compliance Thresholds under Pricing section
  • Fill from 1 to 3 tiers that you want to use for the company.

Example: Tier 1: 30%, Tier 2: 0%, Tier 3: 0%. (Don't use tier 2 and 3)

Sale: As a Salesman user

  • Create a new sale and fill contact field
  • Add a new line with a product that has been configured to use Price Compliance
  • Click on the 🟩, 🟨, 🟧, 🟥 or 🟦 icon at the start of the line.
  • You will see a popup with useful information about the Tier ranges.
  • Play with it and then set a Non Compliant price (change price or discount to achieve this).
  • Try to confirm the Sale and see the error.

Sale: As a Sales Administrator

  • Confirm the previous Sale.
  • See the message on the chatter.

Reporting: Sales report

  • Go to Sales > Reporting > Sales
  • Select bar chart or Pivot view
  • Group by Price Compliance Level

Reporting: Salesperson report

  • Go to Sales > Reporting > Salesperson
  • Select Bar chart + stacked or Pivot view
  • Group by Price Compliance Level

Reporting: Product report

  • Go to Sales > Reporting > Product
  • Select Pie chart + stacked or Pivot view
  • Group by Price Compliance Level

Reporting: Customers report

  • Go to Sales > Reporting > Customers
  • Select Bar chart + stacked or Pivot view
  • Group by Price Compliance Level

No verified information in OCA: Installation, Configuration.

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.