Commissions OCA

commission_oca
REPOSITORY
REPOSITORYOCA/commission
GIT
GIThttps://github.com/OCA/commission.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/commission/tree/19.0/commission_oca
VERSION
VERSION 2.0.0
CATEGORY
CATEGORYInvoicing
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, arantxa-s73, Pablo Cortés
WEBSITE
WEBSITEhttps://github.com/OCA/commission
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:40:48
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - product
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - uom
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module provides the base functions for commission operations to
enable the following:

- Define agents with their commissions
- Assign agents to partners
- Create settlements to summarize commissions for certain periods

You can define which base amount is going to be taken into account: net
amount (based on margin) or gross amount (line subtotal amount).

Code Analysis

Views touched (15)
XML IDNameModelTypeStatus
commission_form commissions form commission form New
commission_tree commissions list commission list New
product_template_form_view_commission product.template.common.form.commission product.template label Inherits product.product_template_form_view
report_settlement report_settlement ir.ui.view qweb New
report_settlement_document report_settlement_document ir.ui.view qweb New
res_partner_view_search res.partner.select res.partner filter Inherits base.view_res_partner_filter
view_commission_mixin_agent_only commission.mixin form New
view_partner_form_agent res.partner.form.agent res.partner xpath Inherits base.view_partner_form
view_settled_wizard Select period to settle commission.make.settle form New
view_settlement_form Settlements commission.settlement form New
view_settlement_line_graph commission.settlement.line.graph commission.settlement.line graph New
view_settlement_line_search commission.settlement.line.search commission.settlement.line search New
view_settlement_line_tree Settlement lines commission.settlement.line list New
view_settlement_search commission.settlement.search commission.settlement search New
view_settlement_tree Settlements list commission.settlement list New
Models touched (9)

New fields (7)
  • active Boolean
    default=True
  • amount_base_type Selection
    default='gross_amount' help="Select the base amount for computing the percentage:\n* 'Sale/Invoice Amount': percentage is computed from the amount put on sales order/invoice.\n* 'Margin (Amount - Cost)': percentage is computed from the profit only, taken the cost from the product." required=True selection=[('gross_amount', 'Sale/Invoice Amount'), ('net_amount', 'Margin (Amount - Cost)')] string='Base'
  • commission_type Selection
    default='fixed' help='Select the percentage type of the commission:\n* \'Fixed percentage\': all commissions are computed with a fixed percentage. You can fill the percentage in the field "Fixed percentage".\n* \'By sections\': percentage varies depending amount intervals. You can fill intervals and percentages in the section "Rate definition".' required=True selection=[('fixed', 'Fixed percentage'), ('section', 'By sections')] string='Type'
  • fix_qty Float
    string='Fixed percentage'
  • name Char
    required=True
  • section_ids One2many → commission.section
    comodel_name='commission.section' inverse_name='commission_id' string='Sections'
  • settlement_type Selection
    selection='_selection_settlement_type'
Public methods (1)
  • calculate_section(self, base)

New fields (5)
  • agent_id Many2one → res.partner
    comodel_name='res.partner' domain="[('agent', '=', True)]" ondelete='restrict' required=True
  • amount Monetary
    compute='_compute_amount' store=True string='Commission Amount'
  • commission_id Many2one → commission
    comodel_name='commission' compute='_compute_commission_id' copy=True ondelete='restrict' readonly=False required=True store=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency'
  • object_id Many2one → commission.mixin
    comodel_name='commission.mixin' copy=False ondelete='cascade' required=True string='Parent'
Public methods (0)

No public methods.

New fields (4)
  • agent_ids Many2many → res.partner
    comodel_name='res.partner' domain="[('agent', '=', True)]"
  • can_settle Boolean
    compute='_compute_can_settle' help='Technical field for improving UX when no extra *commission is installed.'
  • date_to Date
    default=fields.Date.today required=True args: 'Up to'
  • settlement_type Selection
    required=True selection=[]
Public methods (1)
  • action_settle(self)

New fields (4)
  • agent_ids One2many → commission.line.mixin
    comodel_name='commission.line.mixin' compute='_compute_agent_ids' copy=True help='Agents/Commissions related to the invoice line.' inverse_name='object_id' readonly=False store=True string='Agents & commissions'
  • commission_free Boolean
    compute='_compute_commission_free' readonly=True store=True string='Comm. free'
  • commission_status Char
    compute='_compute_commission_status' string='Commission'
  • product_id Many2one → product.product
    comodel_name='product.product' string='Product'
Public methods (2)
  • button_edit_agents(self)
  • recompute_agents(self)

New fields (4)
  • amount_from Float
    string='From'
  • amount_to Float
    string='To'
  • commission_id Many2one → commission
    string='Commission' args: 'commission'
  • percent Float
    required=True
Public methods (0)

No public methods.

New fields (12)
  • agent_id Many2one → res.partner
    comodel_name='res.partner' domain="[('agent', '=', True)]" required=True
  • agent_type Selection
    related='agent_id.agent_type'
  • can_edit Boolean
    compute='_compute_can_edit' help='Technical field for determining if user can edit settlements' store=True
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> required=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' default=<expr> readonly=True required=True
  • date_from Date
    required=True string='From'
  • date_to Date
    required=True string='To'
  • line_ids One2many → commission.settlement.line
    comodel_name='commission.settlement.line' inverse_name='settlement_id' string='Settlement lines'
  • name Char
  • settlement_type Selection
    default='manual' help="The source of the settlement, e.g. 'Sales invoice', 'Sales order', 'Purchase order'..." readonly=True required=True selection=[('manual', 'Manual')]
  • state Selection
    default='settled' readonly=True required=True selection=[('settled', 'Settled'), ('cancel', 'Canceled')]
  • total Float
    compute='_compute_total' readonly=True store=True
Public methods (1)
  • action_cancel(self)

New fields (7)
  • agent_id Many2one → res.partner
    comodel_name='res.partner' related='settlement_id.agent_id' store=True
  • commission_id Many2one → commission
    comodel_name='commission' compute='_compute_commission_id' readonly=False required=True store=True
  • company_id Many2one → res.company
    comodel_name='res.company' related='settlement_id.company_id' store=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True related='settlement_id.currency_id' store=True
  • date Date
    compute='_compute_date' readonly=False required=True store=True
  • settled_amount Monetary
    compute='_compute_settled_amount' readonly=False store=True
  • settlement_id Many2one → commission.settlement
    ondelete='cascade' readonly=True required=True args: 'commission.settlement'
Public methods (0)

No public methods.

New fields (1)
  • commission_free Boolean
    default=False string='Free of commission'
Public methods (0)

No public methods.

New fields (6)
  • agent Boolean
    help='Check this field if the partner is a creditor or an agent.' string='Creditor/Agent'
  • agent_type Selection
    default='agent' selection=[('agent', 'External agent')] string='Type'
  • commission_agent_ids Many2many → res.partner
    column1='partner_id' column2='agent_id' comodel_name='res.partner' domain=[('agent', '=', True)] readonly=False relation='partner_agent_rel' string='Agents'
  • commission_id Many2one → commission
    comodel_name='commission' help='This is the default commission used in the sales where this agent is assigned. It can be changed on each operation if needed.' string='Commission'
  • settlement Selection
    default='monthly' selection=[('biweekly', 'Bi-weekly'), ('monthly', 'Monthly'), ('quaterly', 'Quarterly'), ('semi', 'Semi-annual'), ('annual', 'Annual')] string='Settlement period'
  • settlement_ids One2many → commission.settlement
    comodel_name='commission.settlement' inverse_name='agent_id' readonly=True
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/commission
GIT
GIThttps://github.com/OCA/commission.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/commission/tree/18.0/commission_oca
VERSION
VERSION 1.0.3
CATEGORY
CATEGORYInvoicing
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSLois Rilo, JordiMForgeFlow, Weblate, OCA-git-bot, oca-ci, Carlos Roca
WEBSITE
WEBSITEhttps://github.com/OCA/commission
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:11
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - uom
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module provides the base functions for commission operations to
enable the following:

- Define agents with their commissions
- Assign agents to partners
- Create settlements to summarize commissions for certain periods

You can define which base amount is going to be taken into account: net
amount (based on margin) or gross amount (line subtotal amount).

Code Analysis

Views touched (15)
XML IDNameModelTypeStatus
commission_form commissions form commission form New
commission_tree commissions list commission list New
product_template_form_view_commission product.template.common.form.commission product.template label Inherits product.product_template_form_view
report_settlement report_settlement ir.ui.view qweb New
report_settlement_document report_settlement_document ir.ui.view qweb New
res_partner_view_search res.partner.select res.partner filter Inherits base.view_res_partner_filter
view_commission_mixin_agent_only commission.mixin form New
view_partner_form_agent res.partner.form.agent res.partner xpath Inherits base.view_partner_form
view_settled_wizard Select period to settle commission.make.settle form New
view_settlement_form Settlements commission.settlement form New
view_settlement_line_graph commission.settlement.line.graph commission.settlement.line graph New
view_settlement_line_search commission.settlement.line.search commission.settlement.line search New
view_settlement_line_tree Settlement lines commission.settlement.line list New
view_settlement_search commission.settlement.search commission.settlement search New
view_settlement_tree Settlements list commission.settlement list New
Models touched (9)

New fields (7)
  • active Boolean
    default=True
  • amount_base_type Selection
    default='gross_amount' help="Select the base amount for computing the percentage:\n* 'Sale/Invoice Amount': percentage is computed from the amount put on sales order/invoice.\n* 'Margin (Amount - Cost)': percentage is computed from the profit only, taken the cost from the product." required=True selection=[('gross_amount', 'Sale/Invoice Amount'), ('net_amount', 'Margin (Amount - Cost)')] string='Base'
  • commission_type Selection
    default='fixed' help='Select the percentage type of the commission:\n* \'Fixed percentage\': all commissions are computed with a fixed percentage. You can fill the percentage in the field "Fixed percentage".\n* \'By sections\': percentage varies depending amount intervals. You can fill intervals and percentages in the section "Rate definition".' required=True selection=[('fixed', 'Fixed percentage'), ('section', 'By sections')] string='Type'
  • fix_qty Float
    string='Fixed percentage'
  • name Char
    required=True
  • section_ids One2many → commission.section
    comodel_name='commission.section' inverse_name='commission_id' string='Sections'
  • settlement_type Selection
    selection='_selection_settlement_type'
Public methods (1)
  • calculate_section(self, base)

New fields (5)
  • agent_id Many2one → res.partner
    comodel_name='res.partner' domain="[('agent', '=', True)]" ondelete='restrict' required=True
  • amount Monetary
    compute='_compute_amount' store=True string='Commission Amount'
  • commission_id Many2one → commission
    comodel_name='commission' compute='_compute_commission_id' copy=True ondelete='restrict' readonly=False required=True store=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency'
  • object_id Many2one → commission.mixin
    comodel_name='commission.mixin' copy=False ondelete='cascade' required=True string='Parent'
Public methods (0)

No public methods.

New fields (4)
  • agent_ids Many2many → res.partner
    comodel_name='res.partner' domain="[('agent', '=', True)]"
  • can_settle Boolean
    compute='_compute_can_settle' help='Technical field for improving UX when no extra *commission is installed.'
  • date_to Date
    default=fields.Date.today required=True args: 'Up to'
  • settlement_type Selection
    required=True selection=[]
Public methods (1)
  • action_settle(self)

New fields (4)
  • agent_ids One2many → commission.line.mixin
    comodel_name='commission.line.mixin' compute='_compute_agent_ids' copy=True help='Agents/Commissions related to the invoice line.' inverse_name='object_id' readonly=False store=True string='Agents & commissions'
  • commission_free Boolean
    compute='_compute_commission_free' readonly=True store=True string='Comm. free'
  • commission_status Char
    compute='_compute_commission_status' string='Commission'
  • product_id Many2one → product.product
    comodel_name='product.product' string='Product'
Public methods (2)
  • button_edit_agents(self)
  • recompute_agents(self)

New fields (4)
  • amount_from Float
    string='From'
  • amount_to Float
    string='To'
  • commission_id Many2one → commission
    string='Commission' args: 'commission'
  • percent Float
    required=True
Public methods (0)

No public methods.

New fields (12)
  • agent_id Many2one → res.partner
    comodel_name='res.partner' domain="[('agent', '=', True)]" required=True
  • agent_type Selection
    related='agent_id.agent_type'
  • can_edit Boolean
    compute='_compute_can_edit' help='Technical field for determining if user can edit settlements' store=True
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> required=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' default=<expr> readonly=True required=True
  • date_from Date
    required=True string='From'
  • date_to Date
    required=True string='To'
  • line_ids One2many → commission.settlement.line
    comodel_name='commission.settlement.line' inverse_name='settlement_id' string='Settlement lines'
  • name Char
  • settlement_type Selection
    default='manual' help="The source of the settlement, e.g. 'Sales invoice', 'Sales order', 'Purchase order'..." readonly=True required=True selection=[('manual', 'Manual')]
  • state Selection
    default='settled' readonly=True required=True selection=[('settled', 'Settled'), ('cancel', 'Canceled')]
  • total Float
    compute='_compute_total' readonly=True store=True
Public methods (1)
  • action_cancel(self)

New fields (7)
  • agent_id Many2one → res.partner
    comodel_name='res.partner' related='settlement_id.agent_id' store=True
  • commission_id Many2one → commission
    comodel_name='commission' compute='_compute_commission_id' readonly=False required=True store=True
  • company_id Many2one → res.company
    comodel_name='res.company' related='settlement_id.company_id' store=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True related='settlement_id.currency_id' store=True
  • date Date
    compute='_compute_date' readonly=False required=True store=True
  • settled_amount Monetary
    compute='_compute_settled_amount' readonly=False store=True
  • settlement_id Many2one → commission.settlement
    ondelete='cascade' readonly=True required=True args: 'commission.settlement'
Public methods (0)

No public methods.

New fields (1)
  • commission_free Boolean
    default=False string='Free of commission'
Public methods (0)

No public methods.

New fields (6)
  • agent Boolean
    help='Check this field if the partner is a creditor or an agent.' string='Creditor/Agent'
  • agent_ids Many2many → res.partner
    column1='partner_id' column2='agent_id' comodel_name='res.partner' domain=[('agent', '=', True)] readonly=False relation='partner_agent_rel' string='Agents'
  • agent_type Selection
    default='agent' selection=[('agent', 'External agent')] string='Type'
  • commission_id Many2one → commission
    comodel_name='commission' help='This is the default commission used in the sales where this agent is assigned. It can be changed on each operation if needed.' string='Commission'
  • settlement Selection
    default='monthly' selection=[('biweekly', 'Bi-weekly'), ('monthly', 'Monthly'), ('quaterly', 'Quarterly'), ('semi', 'Semi-annual'), ('annual', 'Annual')] string='Settlement period'
  • settlement_ids One2many → commission.settlement
    comodel_name='commission.settlement' inverse_name='agent_id' readonly=True
Public methods (0)

No public methods.