Sales commissions based on product
sale_commission_product_based · OCA/commission
Health
35/100
poor
-
Security25/25No findings
-
Activity0/25Last human commit 42 months ago
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 12.0
Heuristic over the facts below, not an audit · How it's computed
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.05 MB
Module directory on disk
Code analysis
3 migration notes
3 models
1 view
0 HTTP endpoints
Migration considerations
ProductRule— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. migration-sql-constraints · sourceProductRule— Migrating to 13.0: `@api.multi`/`@api.one` were removed (multi is the default): drop them, looping over `self` where `@api.one` was used. (1 methods) migration-api-multi-one · sourcesale_commission_form— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · 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
Dependencies
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 |
|---|---|---|---|---|
sale_commission_form |
Add product commission to form view of Commission in sales | sale.commission | form | Inherits sale_commission.sale_commission_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 3
New fields (3)
-
commission_typeSelectionselection_add=[('product_fallback', 'Based on Product with Fallback Percentage')] -
product_fallback_amountFloatstring='Fallback Percentage for Product' -
product_rule_idsOne2many → sale.commission.product_rulecomodel_name='sale.commission.product_rule'inverse_name='commission_id'string='Product rules'
-
calculate_product_fallback(self, base, product)Calculate amount for type 'Fixed and Based on Product Percentage'.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (5)
-
amountFloatstring='Percentage' -
commission_idMany2one → sale.commissioncomodel_name='sale.commission'ondelete='cascade'required=True -
product_category_idMany2one → product.categorycomodel_name='product.category' -
product_idMany2one → product.productcomodel_name='product.product' -
sequenceInteger
-
match_product(self, product)@api.multiFind which rule in self is a match for `product`. Rules are evaluated based on their `sequence`. A rule is a match for a product when the product is either the rule's product or has the rule's category.