Product Pricelist Discount by Range
product_pricelist_discount_by_range · OCA/product-attribute
-
Security25/25No findings
-
Activity20/25Last human commit 8 months ago
-
Required by5/250 modules depend on it
-
Maturity12/25In 2 Odoo series since 15.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
ProductPricelistItemDiscountRange— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. migration-sql-constraints · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
This module allows you to define discount ranges in a pricelist based on a reference price (e.g., cost). Instead of applying a single discount percentage to all products, you can configure different discount percentages for specific price intervals. If the reference price is out of the ranges, the pricelist will not be applied and Odoo will show a warning.
Dependencies
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 1
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
product_pricelist_supplier_item_form_view |
product.pricelist.item.form | product.pricelist.item | form | Inherits product.product_pricelist_item_form_view |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 2
-
discount_range_idsOne2many → product.pricelist.item.discount_rangeargs: 'product.pricelist.item.discount_range', 'pricelist_item_id' -
discount_typeSelectiondefault='simple' args: [('simple', 'Simple'), ('range', 'By range')] -
price_discountFloatcompute='_compute_price_discount'readonly=Falsestore=True
No public methods.
-
maxFloatrequired=True -
minFloatrequired=True -
percentageFloatrequired=True -
pricelist_item_idMany2one → product.pricelist.itemondelete='cascade'string='Pricelist Item' args: 'product.pricelist.item' -
surchargeFloat
No public methods.
Loading…