This module extends commission to introduce the use of formulas to compute the agent commissions.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Adds a new 'Formula' commission type so you can calculate agent commissions with a custom formula instead of fixed percentages.
This module extends the commission feature by adding a new commission type called Formula. When you create or edit a commission record, you can choose Formula as the type and then write a small calculation script in the Formula field.
The formula is written in a simple language that can use the sales order line or invoice line being processed. You can refer to fields such as discount, price_subtotal, price_unit, and quantity (or product_uom_qty for sales order lines). The result of the calculation must be stored in a variable called result, which becomes the commission amount.
The module also adds an instructions panel on the commission form that lists the common fields available for sale order lines and invoice lines, so you can easily build your formula.
When a commission is calculated, the system checks if the commission type is Formula and if the product is not marked as commission free. If so, it runs your formula and uses the result as the commission amount. Otherwise, it falls back to the standard commission calculation.
This affects commissions on both sales orders and customer invoices, since the underlying commission line mixin is used by both. The module depends on the base commission module and the accounting module.
Depends on
Models and fields (2)
- commission · extends an existing modelformula, commission_type
- commission.line.mixin · extends an existing model
Text generated by AI (DeepSeek) from reading the Odoo 18.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-03Confirmation status: 1 confirmed, 8 with no information of 9 versions.
Sources · Odoo 18.0
Confirmed on 2026-11-03 in branch 18.0 of OCA/commission.
terminal Installation and usage
OCA documentation · Odoo 18.0Usage
Source · Odoo 18.0To use this module, you need to:
- Go to Commission \> Configuration \> Commission Types, and create a commission with type formula
No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
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.