OdooWiki OCA HUB

Sale Commission Margin

sale_commission_margin folder_open OCA/commission open_in_new
Uncategorised License: AGPL-3

This module extends the functionality of sale_margin and sale_commission to deduct commissions from margin

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

This module changes how the margin on sales order lines is calculated: agent commissions are now subtracted from the margin, so the margin and margin percentage shown on a sales order reflect the real profit after paying commissions.

When you use sales commissions together with margin tracking, this module makes the two work together. On every sales order line, the margin is no longer just the untaxed price minus the cost of the goods; the commissions earned by sales agents on that line are also deducted. The margin percentage is recalculated in the same way, so it always stays consistent with the new margin amount.

The calculation updates automatically whenever the line price, quantity, cost or agent commission amounts change, because it depends on those values. The commission-related fields on the underlying commission mixins are stored and precomputed, which keeps the figures available for reporting and avoids slow screens.

On the sales order form, the total commission field is moved next to the tax totals, so users can see the commission total and the resulting margin side by side. No new menus or reports are added; the change appears directly on the standard sales order screen and affects the sale.order.line model and the commission mixin models.

Depends on

sale_marginsale_commission
Models and fields (3)
  • sale.order.line · extends an existing model
  • commission.mixin · extends an existing modelagent_ids, commission_free
  • commission.line.mixin · extends an existing modelamount, commission_id

Text generated by AI (DeepSeek) from reading the Odoo 16.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-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 16.0

Confirmed on 2026-11-03 in branch 16.0 of OCA/commission.

terminal Installation and usage

OCA documentation · Odoo 16.0
  • Go to Sales -> Configuration -> Settings
  • Scroll to pricing settings and check 'Margins' box.
  • Go to Sales -> Orders -> Quotations
  • Create new quotation and set:
  • Customer
  • One order line
  • In the order line created press edit agents button and set an agent.
  • The agent commission amount should be deducted from margin.

No verified information in OCA: Installation, Configuration.

info

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.