Margins in Sales Orders

sale_margin
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/19.0/sale_margin
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales/Sales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo S.A.
MAINTAINERS
MAINTAINERSOdoo S.A.
COMMITTERS
COMMITTERSOdoo Translation Bot, Julien Castiaux, Victor Feyens, Tiffany Chang (tic), Gorash, Dylan Kiss (dyki), Arnaud Sibille, Ethan Vincent, kcv-odoo
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:51:46
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_management
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - account_payment
    - account
    - onboarding
    - product
    - uom
    - analytic
    - portal
    - http_routing
    - auth_signup
    - digest
    - resource
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds the 'Margin' on sales order.
=============================================

This gives the profitability by calculating the difference between the Unit
Price and Cost Price.
    

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
sale_margin_sale_order sale.order.margin.view.form sale.order field Inherits sale.view_order_form
sale_margin_sale_order_graph sale.order.margin.view.graph sale.order graph Inherits sale.view_sale_order_graph
sale_margin_sale_order_pivot sale.order.margin.view.pivot sale.order pivot Inherits sale.view_sale_order_pivot
Models touched (3)

New fields (2)
  • margin Monetary
    compute='_compute_margin' store=True args: 'Margin'
  • margin_percent Float
    aggregator='avg' compute='_compute_margin' store=True args: 'Margin (%)'
Public methods (0)

No public methods.

New fields (3)
  • margin Float
    compute='_compute_margin' groups='base.group_user' min_display_digits='Product Price' precompute=True store=True args: 'Margin'
  • margin_percent Float
    compute='_compute_margin' groups='base.group_user' precompute=True store=True args: 'Margin (%)'
  • purchase_price Float
    compute='_compute_purchase_price' copy=False groups='base.group_user' min_display_digits='Product Price' precompute=True readonly=False store=True string='Cost'
Public methods (0)

No public methods.

New fields (1)
  • margin Float
    args: 'Margin'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/18.0/sale_margin
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales/Sales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Odoo Online, Victor Feyens, oco-odoo, Tiffany Chang (tic), Gorash, Louis Wicket (wil), Dylan Kiss (dyki), Arnaud Sibille, Ethan Vincent, Louis (wil), Manushi Shah
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:25:59
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_management
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - account_payment
    - account
    - onboarding
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds the 'Margin' on sales order.
=============================================

This gives the profitability by calculating the difference between the Unit
Price and Cost Price.
    

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
sale_margin_sale_order sale.order.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_graph sale.order.margin.view.graph sale.order graph Inherits sale.view_sale_order_graph
sale_margin_sale_order_line sale.order.line.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line_form sale.order.line.list.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_pivot sale.order.margin.view.pivot sale.order pivot Inherits sale.view_sale_order_pivot
Models touched (3)

New fields (2)
  • margin Monetary
    compute='_compute_margin' store=True args: 'Margin'
  • margin_percent Float
    aggregator='avg' compute='_compute_margin' store=True args: 'Margin (%)'
Public methods (0)

No public methods.

New fields (3)
  • margin Float
    compute='_compute_margin' groups='base.group_user' min_display_digits='Product Price' precompute=True store=True args: 'Margin'
  • margin_percent Float
    compute='_compute_margin' groups='base.group_user' precompute=True store=True args: 'Margin (%)'
  • purchase_price Float
    compute='_compute_purchase_price' copy=False groups='base.group_user' min_display_digits='Product Price' precompute=True readonly=False store=True string='Cost'
Public methods (0)

No public methods.

New fields (1)
  • margin Float
    args: 'Margin'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/17.0/sale_margin
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales/Sales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Victor Feyens, Tiffany Chang (tic), Rémy Voet (ryv), Gorash, Arnaud Joset, aliya, Louis Wicket (wil), Dylan Kiss (dyki), Horacio Tellez (hote), Ethan Vincent, Louis (wil)
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:02:10
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_management
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - account_payment
    - account
    - onboarding
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds the 'Margin' on sales order.
=============================================

This gives the profitability by calculating the difference between the Unit
Price and Cost Price.
    

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
sale_margin_sale_order sale.order.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_graph sale.order.margin.view.graph sale.order graph Inherits sale.view_sale_order_graph
sale_margin_sale_order_line sale.order.line.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line_form sale.order.line.tree.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_pivot sale.order.margin.view.pivot sale.order pivot Inherits sale.view_sale_order_pivot
Models touched (3)

New fields (2)
  • margin Monetary
    compute='_compute_margin' store=True args: 'Margin'
  • margin_percent Float
    compute='_compute_margin' group_operator='avg' store=True args: 'Margin (%)'
Public methods (0)

No public methods.

New fields (3)
  • margin Float
    compute='_compute_margin' digits='Product Price' groups='base.group_user' precompute=True store=True args: 'Margin'
  • margin_percent Float
    compute='_compute_margin' groups='base.group_user' precompute=True store=True args: 'Margin (%)'
  • purchase_price Float
    compute='_compute_purchase_price' copy=False digits='Product Price' groups='base.group_user' precompute=True readonly=False store=True string='Cost'
Public methods (0)

No public methods.

New fields (1)
  • margin Float
    args: 'Margin'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/16.0/sale_margin
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales/Sales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Denis Ledoux, Yannick Tivisse, Victor Feyens, Achraf (abz), william-andre, aliya, Horacio Tellez, Horacio Tellez (hote)
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:53
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_management
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - account_payment
    - account
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds the 'Margin' on sales order.
=============================================

This gives the profitability by calculating the difference between the Unit
Price and Cost Price.
    

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
sale_margin_sale_order sale.order.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_graph sale.order.margin.view.graph sale.order graph Inherits sale.view_sale_order_graph
sale_margin_sale_order_line sale.order.line.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line_form sale.order.line.tree.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_pivot sale.order.margin.view.pivot sale.order pivot Inherits sale.view_sale_order_pivot
Models touched (3)

New fields (2)
  • margin Monetary
    compute='_compute_margin' store=True args: 'Margin'
  • margin_percent Float
    compute='_compute_margin' group_operator='avg' store=True args: 'Margin (%)'
Public methods (0)

No public methods.

New fields (3)
  • margin Float
    compute='_compute_margin' digits='Product Price' groups='base.group_user' precompute=True store=True args: 'Margin'
  • margin_percent Float
    compute='_compute_margin' groups='base.group_user' precompute=True store=True args: 'Margin (%)'
  • purchase_price Float
    compute='_compute_purchase_price' copy=False digits='Product Price' groups='base.group_user' precompute=True readonly=False store=True string='Cost'
Public methods (0)

No public methods.

New fields (1)
  • margin Float
    args: 'Margin'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/15.0/sale_margin
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales/Sales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Xavier-Do, Victor Feyens, Andrea Grazioso (agr-odoo), oco-odoo, Achraf (abz), nie, Laurent Stukkens (LTU), Demesmaeker, David
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:25:29
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_management
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - payment
    - account
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds the 'Margin' on sales order.
=============================================

This gives the profitability by calculating the difference between the Unit
Price and Cost Price.
    

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
sale_margin_sale_order sale.order.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_graph sale.order.margin.view.graph sale.order graph Inherits sale.view_sale_order_graph
sale_margin_sale_order_line sale.order.line.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line_form sale.order.line.tree.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_pivot sale.order.margin.view.pivot sale.order pivot Inherits sale.view_sale_order_pivot
Models touched (3)

New fields (2)
  • margin Monetary
    compute='_compute_margin' store=True args: 'Margin'
  • margin_percent Float
    compute='_compute_margin' group_operator='avg' store=True args: 'Margin (%)'
Public methods (0)

No public methods.

New fields (3)
  • margin Float
    compute='_compute_margin' digits='Product Price' groups='base.group_user' store=True args: 'Margin'
  • margin_percent Float
    compute='_compute_margin' group_operator='avg' groups='base.group_user' store=True args: 'Margin (%)'
  • purchase_price Float
    compute='_compute_purchase_price' copy=False digits='Product Price' groups='base.group_user' readonly=False store=True string='Cost'
Public methods (0)

No public methods.

New fields (1)
  • margin Float
    args: 'Margin'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/14.0/sale_margin
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales/Sales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Olivier Dony, Christophe Simonis, Damien Bouvy, Yannick Tivisse, Xavier-Do, Victor Feyens, Andrea Grazioso (agr-odoo), Achraf (abz), nie, Demesmaeker
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:14:30
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_management
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - payment
    - account
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds the 'Margin' on sales order.
=============================================

This gives the profitability by calculating the difference between the Unit
Price and Cost Price.
    

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
sale_margin_sale_order sale.order.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_graph sale.order.margin.view.graph sale.order graph Inherits sale.view_sale_order_graph
sale_margin_sale_order_line sale.order.line.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line_form sale.order.line.tree.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_pivot sale.order.margin.view.pivot sale.order pivot Inherits sale.view_sale_order_pivot
Models touched (3)

New fields (2)
  • margin Monetary
    compute='_compute_margin' store=True args: 'Margin'
  • margin_percent Float
    compute='_compute_margin' group_operator='avg' store=True args: 'Margin (%)'
Public methods (0)

No public methods.

New fields (3)
  • margin Float
    compute='_compute_margin' digits='Product Price' groups='base.group_user' store=True args: 'Margin'
  • margin_percent Float
    compute='_compute_margin' group_operator='avg' groups='base.group_user' store=True args: 'Margin (%)'
  • purchase_price Float
    compute='_compute_purchase_price' digits='Product Price' groups='base.group_user' readonly=False store=True string='Cost'
Public methods (0)

No public methods.

New fields (1)
  • margin Float
    args: 'Margin'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/13.0/sale_margin
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales/Sales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Christophe Simonis, David Monjoie, Damien Bouvy, Yannick Tivisse, Jorge Pinna Puissant, Xavier-Do, Victor Feyens, nouraellm
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:06:44
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_management
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - payment
    - account
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds the 'Margin' on sales order.
=============================================

This gives the profitability by calculating the difference between the Unit
Price and Cost Price.
    

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
sale_margin_sale_order sale.order.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line sale.order.line.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line_form sale.order.line.tree.margin.view.form sale.order xpath Inherits sale.view_order_form
Models touched (3)

New fields (1)
  • margin Monetary
    compute='_product_margin' currency_field='currency_id' help='It gives profitability by calculating the difference between the Unit Price and the cost.' store=True
Public methods (0)

No public methods.

New fields (2)
  • margin Float
    compute='_product_margin' digits='Product Price' store=True
  • purchase_price Float
    digits='Product Price' string='Cost'
Public methods (3)
  • create(self, vals)
    @api.model
  • product_id_change(self)
    @api.onchange('product_id')
  • product_id_change_margin(self)
    @api.onchange('product_id', 'product_uom')

New fields (1)
  • margin Float
    args: 'Margin'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/12.0/sale_margin
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Christophe Simonis, Nicolas Martinelli, Yannick Tivisse, jem-odoo, RomainLibert, Nans Lefebvre, XavierDo, Xavier-Do, Victor Feyens
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:57:02
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_management
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - payment
    - account
    - product
    - decimal_precision
    - uom
    - analytic
    - portal
    - http_routing
    - digest
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds the 'Margin' on sales order.
=============================================

This gives the profitability by calculating the difference between the Unit
Price and Cost Price.
    

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
sale_margin_sale_order sale.order.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line sale.order.line.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line_form sale.order.line.tree.margin.view.form sale.order xpath Inherits sale.view_order_form
Models touched (3)

New fields (1)
  • margin Monetary
    compute='_product_margin' currency_field='currency_id' digits=dp.get_precision('Product Price') help='It gives profitability by calculating the difference between the Unit Price and the cost.' store=True
Public methods (0)

No public methods.

New fields (2)
  • margin Float
    compute='_product_margin' digits=dp.get_precision('Product Price') store=True
  • purchase_price Float
    digits=dp.get_precision('Product Price') string='Cost'
Public methods (2)
  • create(self, vals)
    @api.model
  • product_id_change_margin(self)
    @api.onchange('product_id', 'product_uom')

New fields (1)
  • margin Float
    args: 'Margin'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/11.0/sale_margin
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Christophe Simonis, Xavier Morel, GitHub, Yannick Tivisse, Odoo Online, Victor Feyens
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:53:44
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_management
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - account
    - product
    - decimal_precision
    - analytic
    - web_planner
    - portal
    - http_routing
    - account_invoicing
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds the 'Margin' on sales order.
=============================================

This gives the profitability by calculating the difference between the Unit
Price and Cost Price.
    

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
sale_margin_sale_order sale.order.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line sale.order.line.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line_form sale.order.line.tree.margin.view.form sale.order xpath Inherits sale.view_order_form
Models touched (3)

New fields (1)
  • margin Monetary
    compute='_product_margin' currency_field='currency_id' digits=dp.get_precision('Product Price') help='It gives profitability by calculating the difference between the Unit Price and the cost.' store=True
Public methods (0)

No public methods.

New fields (2)
  • margin Float
    compute='_product_margin' digits=dp.get_precision('Product Price') store=True
  • purchase_price Float
    digits=dp.get_precision('Product Price') string='Cost'
Public methods (2)
  • create(self, vals)
    @api.model
  • product_id_change_margin(self)
    @api.onchange('product_id', 'product_uom')

New fields (1)
  • margin Float
    args: 'Margin'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/10.0/sale_margin
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Christophe Matthieu, Martin Trigaux, Olivier Dony, Thibault Delavallée, Denis Ledoux, Christophe Simonis, Goffin Simon, Julien Legros, qdp-odoo, Yannick Tivisse
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:50:49
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web_kanban
    - web
    - bus
    - web_tour
    - account
    - product
    - decimal_precision
    - report
    - analytic
    - web_planner
    - procurement
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds the 'Margin' on sales order.
=============================================

This gives the profitability by calculating the difference between the Unit
Price and Cost Price.
    

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
sale_margin_sale_order sale.order.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line sale.order.line.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line_form sale.order.line.tree.margin.view.form sale.order xpath Inherits sale.view_order_form
Models touched (3)

New fields (1)
  • margin Monetary
    compute='_product_margin' currency_field='currency_id' digits=dp.get_precision('Product Price') help='It gives profitability by calculating the difference between the Unit Price and the cost.' store=True
Public methods (0)

No public methods.

New fields (2)
  • margin Float
    compute='_product_margin' digits=dp.get_precision('Product Price') store=True
  • purchase_price Float
    digits=dp.get_precision('Product Price') string='Cost'
Public methods (2)
  • create(self, vals)
    @api.model
  • product_id_change_margin(self)
    @api.onchange('product_id', 'product_uom')

New fields (1)
  • margin Float
    args: 'Margin'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/9.0/sale_margin
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOpenERP SA
MAINTAINERS
MAINTAINERSOpenERP SA
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Antony Lesuisse, Olivier Dony, Thibault Delavallée, Denis Ledoux, Christophe Simonis, Goffin Simon, Nicolas Martinelli, Richard Mathot, qdp-odoo, Damien Bouvy, Yannick Tivisse
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:48:31
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web_kanban
    - web
    - bus
    - account
    - product
    - decimal_precision
    - report
    - analytic
    - web_tip
    - web_planner
    - procurement
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds the 'Margin' on sales order.
=============================================

This gives the profitability by calculating the difference between the Unit
Price and Cost Price.
    

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
sale_margin_sale_order sale.order.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line sale.order.line.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line_form sale.order.line.tree.margin.view.form sale.order xpath Inherits sale.view_order_form
Models touched (1)

New fields (1)
  • margin Float
    args: 'Margin'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/8.0/sale_margin
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales Management
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOpenERP SA
MAINTAINERS
MAINTAINERSOpenERP SA
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Fabien Pinckaers, Olivier Dony, Vo Minh Thu, Launchpad Translations on behalf of openerp, Quentin (OpenERP), Denis Ledoux, Christophe Simonis, Joren Van Onder, Goffin Simon, Cedric Snauwaert, Aaron Bohy, sgo@tinyerp.com
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:45:40
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web_kanban
    - web
    - web_kanban_sparkline
    - account_voucher
    - account
    - product
    - decimal_precision
    - report
    - analytic
    - board
    - edi
    - email_template
    - procurement
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds the 'Margin' on sales order.
=============================================

This gives the profitability by calculating the difference between the Unit
Price and Cost Price.
    

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
sale_margin_sale_order sale.order.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line sale.order.line.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line_form sale.order.line.tree.margin.view.form sale.order xpath Inherits sale.view_order_form
Models touched (0)

No models found for this module.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/7.0/sale_margin
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales Management
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOpenERP SA
MAINTAINERS
MAINTAINERSOpenERP SA
COMMITTERS
COMMITTERSRaphael Collet, Twinkle Christian (OpenERP), Cecile Tonglet, Rucha (Open ERP), Atul Patel (OpenERP), Stephane Wirtel, Odoo Translation Bot, Harry (OpenERP), Antonin Bourguignon, Martin Trigaux, Ajay Chauhan (OpenERP), Purnendu Singh (OpenERP), Fabien Pinckaers, Olivier Dony, Rajesh Prajapati (OpenERP), Vo Minh Thu, Hardik, Launchpad Translations on behalf of openerp, Quentin (OpenERP), Kuldeep Joshi (OpenERP), Denis Ledoux, Sanjay Gohel (Open ERP), Fabien Meghazi, Frédéric van der Essen, Nicolas Martinelli, Serpent Consulting Services, Amit (OpenERP), Dharti Ratani (Open ERP)
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:43:11
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale
    - account_voucher
    - account
    - base_setup
    - base
    - web_kanban
    - web
    - product
    - process
    - decimal_precision
    - mail
    - analytic
    - board
    - edi
    - email_template
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds the 'Margin' on sales order.
=============================================

This gives the profitability by calculating the difference between the Unit
Price and Cost Price.
    

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
sale_margin_sale_order sale.order.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line sale.order.line.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line_form sale.order.line.tree.margin.view.form sale.order xpath Inherits sale.view_order_form
Models touched (0)

No models found for this module.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/6.1/sale_margin
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales Management
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOpenERP SA
MAINTAINERS
MAINTAINERSOpenERP SA
COMMITTERS
COMMITTERSRaphael Collet, Stephane Wirtel, Fabien Pinckaers, Antony Lesuisse, Meera Trambadia (OpenERP), Olivier Dony, Vo Minh Thu, Launchpad Translations on behalf of openerp, Quentin (OpenERP), Kuldeep Joshi (OpenERP), vro, olt@tinyerp.com, niv-openerp, Xavier ALT, Xavier Morel, Carlos Vásquez, Els Van Vossel, Israel Fermin Montilla, rch-openerp, Bharat (OpenERP), ARA (OpenERP), mtr, fp, Ariel Figueroa
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:41:35
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale
    - stock
    - product
    - base
    - process
    - decimal_precision
    - account
    - base_setup
    - analytic
    - board
    - edi
    - email_template
    - mail
    - base_tools
    - procurement
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds the 'Margin' on sales order.
=============================================

This gives the profitability by calculating the difference between the Unit Price and Cost Price.
    

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
sale_margin_sale_order sale.order.margin.view.form sale.order field Inherits sale.view_order_form
sale_margin_sale_order_line sale.order.line.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line_form sale.order.line.tree.margin.view.form sale.order xpath Inherits sale.view_order_form
sale_margin_sale_order_line_tree sale.order.margin.line.view.tree sale.order.line field Inherits sale.view_order_line_tree
sale_margin_sale_order_tree sale.order.margin.view.tree sale.order field Inherits sale.view_order_tree
Models touched (0)

No models found for this module.