Sales commissions based on product

sale_commission_product_based
REPOSITORY
REPOSITORYOCA/commission
GIT
GIThttps://github.com/OCA/commission.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/commission/tree/12.0/sale_commission_product_based
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYSales
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), TAKOBI
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), TAKOBI
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, Simone Rubino, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/commission
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:16
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/commission:
    - sale_commission
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - http_routing
    - digest
    - sale_management
    - sale
    - sales_team
    - payment
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
sale_commission_form Add product commission to form view of Commission in sales sale.commission field Inherits sale_commission.sale_commission_form
Models touched (3)

New fields (3)
  • commission_type Selection
    selection_add=[('product_fallback', 'Based on Product with Fallback Percentage')]
  • product_fallback_amount Float
    string='Fallback Percentage for Product'
  • product_rule_ids One2many → sale.commission.product_rule
    comodel_name='sale.commission.product_rule' inverse_name='commission_id' string='Product rules'
Public methods (1)
  • 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)
  • amount Float
    string='Percentage'
  • commission_id Many2one → sale.commission
    comodel_name='sale.commission' ondelete='cascade' required=True
  • product_category_id Many2one → product.category
    comodel_name='product.category'
  • product_id Many2one → product.product
    comodel_name='product.product'
  • sequence Integer
Public methods (1)
  • match_product(self, product)
    @api.multi
    Find 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.