OdooWiki OCA HUB

Account Invoice Margin Sale

account_invoice_margin_sale folder_open OCA/margin-analysis open_in_new
Account License: AGPL-3

This module propagates purchase price from sale order line to invoice and discards the invoice lines coming from sale order lines with down-payment when computing the margin.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

When invoices are created from sales orders, the cost price of each product is copied onto the invoice line so the margin can be calculated. Down-payment lines are excluded from margin calculations and shown with a zero margin.

This module links the margin information of sales orders to the invoices generated from them.

  • When an invoice line is created from a sales order line, the purchase price (cost) recorded on the sales order line is copied to the invoice line. This allows Odoo to compute the margin on the invoice.
  • Invoice lines that come from down-payment sales order lines are treated specially: their margin, signed margin and margin percentage are forced to zero, and they are left out of the lines used to compute the invoice margin.

It works behind the scenes on invoices (account.move), invoice lines (account.move.line) and sales order lines (sale.order.line). There are no new menus, buttons or reports; the change is visible in the margin figures already shown on invoices and invoice lines. The module installs automatically when both the sales margin and invoice margin features are present.

Depends on

Models and fields (3)
  • account.move · extends an existing model
  • sale.order.line · extends an existing model
  • account.move.line · extends an existing model

Text generated by AI (DeepSeek) from reading the Odoo 19.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: 8 confirmed, 1 with no information of 9 versions.

Sources · Odoo 17.0

Confirmed on 2026-11-03 in branch 17.0 of OCA/margin-analysis.

terminal Installation and usage

OCA documentation · Odoo 19.0

This module is autoinstalable.

This module also needs a security group to show margins.

  • To activate it go to user and active "Show Invoice Margin" in security options.

No verified information in OCA: 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.