Sale pricelist global rule

sale_pricelist_global_rule
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/17.0/sale_pricelist_global_rule
VERSION
VERSION 1.0.2
CATEGORY
CATEGORYSales Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSPedro M. Baeza, Carlos Lopez, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:05
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - account_payment
    - account
    - onboarding
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
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).

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
view_product_pricelist_item_form view.product.pricelist.item.form product.pricelist.item xpath Inherits product.product_pricelist_item_form_view
view_sale_order_form view.sale.order.form sale.order xpath Inherits sale.view_order_form
Models touched (3)

New fields (3)
  • applied_on Selection
    ondelete={'3_1_global_product_template': 'set default', '3_2_global_product_category': 'set default'} selection_add=[('3_1_global_product_template', 'Global - Product template'), ('3_2_global_product_category', 'Global - Product category')]
  • global_categ_id Many2one → product.category
    ondelete='cascade' args: 'product.category', 'Product Category'
  • global_product_tmpl_id Many2one → product.template
    check_company=True ondelete='cascade' args: 'product.template', 'Product'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, values)

New fields (2)
  • has_pricelist_global Boolean
    compute='_compute_has_pricelist_global'
  • need_recompute_pricelist_global Boolean
Public methods (1)
  • button_compute_pricelist_global_rule(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/15.0/sale_pricelist_global_rule
VERSION
VERSION 1.0.3
CATEGORY
CATEGORYSales Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSPedro M. Baeza, Carlos Lopez, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:34
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - payment
    - account
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
view_product_pricelist_item_form view.product.pricelist.item.form product.pricelist.item xpath Inherits product.product_pricelist_item_form_view
view_sale_order_form view.sale.order.form sale.order xpath Inherits sale.view_order_form
Models touched (3)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (3)
  • applied_on Selection
    ondelete={'4_global_product_template': 'set default', '5_global_product_category': 'set default'} selection_add=[('4_global_product_template', 'Global - Product template'), ('5_global_product_category', 'Global - Product category')]
  • global_categ_id Many2one → product.category
    ondelete='cascade' args: 'product.category', 'Product Category'
  • global_product_tmpl_id Many2one → product.template
    check_company=True ondelete='cascade' args: 'product.template', 'Product'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, values)

New fields (2)
  • has_pricelist_global Boolean
    compute='_compute_has_pricelist_global'
  • need_recompute_pricelist_global Boolean
Public methods (1)
  • button_compute_pricelist_global_rule(self)
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/sale-workflow
PULL REQUEST
PULL REQUEST[18.0][MIG] sale_pricelist_global_rule: Migration to 18.0 (#4065)
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/sale-workflow
PULL REQUEST
PULL REQUEST[16.0][MIG] sale_pricelist_global_rule (#3533)