OdooWiki OCA HUB

Sale Commission Margin

sale_commission_margin_oca 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 18.0

This module makes the margin on sales order lines take sales commissions into account, so the margin you see is the real profit after paying agents.

When you use sales commissions together with margin tracking, this module changes how the margin is calculated on each sales order line.

  • The margin is now the untaxed line total minus the product cost (purchase price times quantity) minus the sum of the commission amounts of the agents linked to that line.
  • The margin percentage is recalculated from this new margin, so it also reflects the commission cost.
  • The calculation updates automatically whenever the line total, quantity, cost or agent commission amounts change.

On the sales order form, the total commission field is moved so it appears right after the tax totals block, making the commission figure easier to see next to the order totals.

The module touches the sales order line model (sale.order.line) and the commission mixins used by sales documents and commission lines (commission.mixin and commission.line.mixin). It depends on the margin and commission modules, so those must be installed for it to work.

Depends on

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 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-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation 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.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.