Sale pricelist global rule
sale_pricelist_global_rule · OCA/sale-workflow
-
Security25/25No findings
-
Activity25/25Last human commit 2 months ago
-
Required by5/250 modules depend on it
-
Maturity18/25In 3 Odoo series since 15.0
Heuristic over the facts below, not an audit · How it's computed
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).
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 2
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_product_pricelist_item_form |
view.product.pricelist.item.form | product.pricelist.item | form | Inherits product.product_pricelist_item_form_view |
view_sale_order_form |
view.sale.order.form | sale.order | form | Inherits sale.view_order_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 3
-
applied_onSelectionondelete={'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')] -
display_applied_onSelectionondelete={'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_idMany2one → product.categoryondelete='cascade' args: 'product.category', 'Product Category' -
global_product_tmpl_idMany2one → product.templatecheck_company=Trueondelete='cascade' args: 'product.template', 'Global Product'
-
create(self, vals_list)@api.model_create_multi -
write(self, values)
-
has_pricelist_globalBooleancompute='_compute_has_pricelist_global' -
need_recompute_pricelist_globalBoolean
-
button_compute_pricelist_global_rule(self)
No new fields.
Public methods (0)No public methods.
Loading…
Loading…
Loading…