OdooWiki OCA HUB

Sale Semaphore

sale_semaphore folder_open OCA/sale-workflow open_in_new
Sale License: AGPL-3

This module adds a commercial semaphore to help sales teams assess whether a quoted price stays within the discount policy defined for a product or product category.

For each product you can define three discount thresholds, expressed as a percentage over the public sale price:

  • Green: price is within the preferred commercial margin.
  • Yellow: price is still acceptable, but already close to the limit.
  • Red: price is below the warning threshold and should be reviewed.

The semaphore is displayed directly on sales order lines and propagated to customer invoice lines and reporting models, so the same visual indicator is available during the full sales flow.

When no product-specific configuration exists, the module can also reuse the thresholds defined on the product category.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Adds a colour semaphore (green, yellow, red) to sales order lines showing whether the negotiated price respects the discount policy set on the product or its category, and blocks non-managers from confirming or editing lines priced below the accepted limit.

For each product or product category you can activate a semaphore and set three discount percentages: success, warning and danger. On a sales order line, Odoo compares the net unit price with the product's public price and shows a coloured dot: green when the price is within the success threshold, yellow when it is only within the warning threshold, and red when it falls below the danger threshold. The same indicator is carried over to customer invoice lines and to the sales and invoice analysis reports, where you can group results by semaphore.

Clicking the dot on a sales order line opens a small popover that lets you set the price to the maximum allowed for success, warning or danger, or reset the price. If the product or its category has no semaphore activated, a message explains that the feature is not available for that line.

Business rules: a line whose price is below the danger threshold is flagged, highlighted in red in the order lines, and non-managers cannot confirm the order or change the price or discount of such a line once it is confirmed or done. Sales managers are not blocked. The semaphore is computed automatically from the product, unit of measure, quantity, unit price and discount.

Depends on

sale
Models and fields (8)
  • sale.order · extends an existing modelprice_below_semaphore
  • sale.report · extends an existing modelsemaphore
  • product.product · extends an existing modelsemaphore_active, semaphore_discount_danger (Discount Danger), semaphore_discount_success (Discount Success), semaphore_discount_warning (Discount Warning)
  • sale.order.line · extends an existing modelsemaphore, semaphore_active, price_below_semaphore, semaphore_max_price_danger, semaphore_max_price_success, semaphore_max_price_warning
  • product.category · extends an existing modelsemaphore_active, semaphore_discount_danger (Discount Danger), semaphore_discount_success (Discount Success), semaphore_discount_warning (Discount Warning)
  • product.template · extends an existing modelsemaphore_active, semaphore_discount_danger (Discount Danger), semaphore_discount_success (Discount Success), semaphore_discount_warning (Discount Warning)
  • account.move.line · extends an existing modelsemaphore
  • account.invoice.report · extends an existing modelsemaphore

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-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 2 confirmed, 7 with no information of 9 versions.

Sources · Odoo 15.0

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

terminal Installation and usage

OCA documentation · Odoo 18.0

To use this module:

  • Go to Sales \> Products \> Products and open a product.
  • In the Sales tab, enable Semaphore.
  • Define the allowed discount percentages for the three thresholds:
  • Discount Success: upper band for a green result.
  • Discount Warning: upper band for a yellow result.
  • Discount Danger: final accepted limit.
  • Optionally, configure the same values on the product category to provide default thresholds for all products in that category.

Once configured, the semaphore is evaluated automatically on each sales order line according to the effective unit price:

  • Green when the price stays above the success threshold.
  • Yellow when the price falls below the success threshold but remains above the warning threshold.
  • Red when the price falls below the warning threshold.

Additional behavior:

  • The line is highlighted when the price goes below the danger threshold.
  • The semaphore value is copied to invoice lines.
  • Non-manager users are prevented from confirming or updating confirmed sales orders when the effective price is below both the configured semaphore limit and the applicable pricelist price.
  • Product-level settings take precedence over category-level settings.

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.