OdooWiki OCA HUB

Sale pricelist global rule

sale_pricelist_global_rule folder_open OCA/sale-workflow open_in_new
Sales Management License: AGPL-3

This module allows configured pricelists to be applied to a sales order by considering cumulative quantities across all lines.

Global by Product Template

If a pricelist rule has a min_quantity = 15, and a sales order contains:

  • Line 1: Variant 1, quantity = 8
  • Line 2: Variant 2, quantity = 8

Global by Product Category

Similarly, if a pricelist rule has a min_quantity = 20 for products within a category, and a sales order includes:

  • Line 1: Product 1, quantity = 10
  • Line 2: Product 2, quantity = 10

In standard Odoo, pricelist rules would not apply since no single line meets the minimum quantity. With this module, however, cumulative quantities across lines allow the pricelist rule to apply, as they meet the minimum threshold (16 in the product template example and 20 in the product category example).

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Lets you create pricelist rules that apply based on the total quantity of a product or product category across all lines of a sales order, not just per line. A button on the sales order recalculates prices and discounts using these global rules.

Standard Odoo pricelist rules only look at the quantity on a single order line. This module adds two new rule types on pricelists: "Global - Product template" and "Global - Product category".

When you create a pricelist rule, you can now choose one of these global options and select the product or product category it applies to. The rule then checks the combined quantity of that product (or of products in that category) across every line of the sales order. If the total reaches the rule's minimum quantity, the price or discount is applied to the matching lines.

On the sales order form, a "Recompute pricelist global" button appears when the order uses a pricelist with global rules and the lines have changed. Pressing it clears line discounts and recalculates the pricelist rule, unit price and discount for all lines using the cumulative quantities. The button is only visible for draft or sent orders.

The module also validates that you specify a product or category when saving a global rule, and automatically names the rule (for example "Global product: ..." or "Global category: ..."). It touches the pricelist item, sales order and sales order line models.

Depends on

sale
Models and fields (3)
  • sale.order · extends an existing modelhas_pricelist_global, need_recompute_pricelist_global
  • sale.order.line · extends an existing model
  • product.pricelist.item · extends an existing modelapplied_on, global_categ_id, display_applied_on, global_product_tmpl_id

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

Sources · Odoo 17.0

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

terminal Installation and usage

OCA documentation · Odoo 19.0
  • Go to Sales -\> Products -\> Pricelist.
  • Create a new Pricelist and add at least one line with the Apply On option set to Global - Product template or Global - Product category
  • Choose the specific product template or category for the rule.
  • Set the computation mode and save
  • Go to Sales -\> Orders -\> Quotations.
  • Create a new record and fill the required fields.
  • Choose a Pricelist that has a global rule configured (either by Category or Product).
  • Click the Recompute pricelist global button to update prices according to the specified pricelist rules.

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.