Product Historical Margin

product_historical_margin
REPOSITORY
REPOSITORYOCA/margin-analysis
GIT
GIThttps://github.com/OCA/margin-analysis.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/margin-analysis/tree/10.0/product_historical_margin
VERSION
VERSION 0.2
CATEGORY
CATEGORYAccounting & Finance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSPedro M. Baeza
WEBSITE
WEBSITEhttp://www.camptocamp.com/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:20:00
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/margin-analysis:
    - product_standard_margin
    - product_replenishment_cost
odoo/odoo:
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - bus
    - web_tour
    - report
    - sales_team
    - account
    - analytic
    - web_planner
    - sale
    - procurement
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
 This module will store in the invoice line all the historical informations to allow you to compute
 your margin on product. We will always work in company currency and in invoice currency (to respect the OpenERP
 philosophy, as it is done in accounting entries for example). You now have the possibility to open a list 
 view of your products and having the margin computed for a given period of time. 
 
 In the product form, you also will have a computed field that show you the info based on all invoice lines
 historic.
 
 You can use this module in conjonction with the product_cost_incl_bom one to have the right margin 
 computed from BOM costing.
 
 WARNING:
 
 1) The amount of the unit price in company currency in the invoice line is converted with the currency
 rate of the date of the creation/modification of the invoice line (not the invoice date). This choice 
 has been made mainly because the cost price of the product is known at the invoice creation, but we don't 
 have it at the date of the invoice (no historical values in the cost price...) !
 
 
 

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
view_account_invoice_line_filter account.invoice.line.select account.invoice.line search New
view_historical_margin historical.margin.form historical.margin form New
view_invoice_line_form_from_product account.invoice.line.from.product.form account.invoice.line form New
view_invoice_line_tree_from_product account.invoice.line.from.product.tree account.invoice.line tree New
view_product_historical_margin product.product.historical_margin.tree product.product tree New
view_product_historical_margin_form product_historical_margin.form product.product field Inherits product_standard_margin.sale_markup_product_form
Models touched (4)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False)
    The percentage of the relative margin has to be recomputed asit is nor a sum, nor a avg, but a percentage of 2 valuesof the line computed as: margin_relative = margin_absolute / subtotal_company * 100

New fields (0)

No new fields.

Public methods (1)
  • action_open_window(self, cr, uid, ids, context=None)
    Open the historical margin view

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/margin-analysis
GIT
GIThttps://github.com/OCA/margin-analysis.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/margin-analysis/tree/9.0/product_historical_margin
VERSION
VERSION 0.2
CATEGORY
CATEGORYAccounting & Finance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERS
WEBSITE
WEBSITEhttp://www.camptocamp.com/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:15:23
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/margin-analysis:
    - product_standard_margin
    - product_replenishment_cost
odoo/odoo:
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - bus
    - report
    - account
    - analytic
    - web_tip
    - web_planner
    - sale
    - sales_team
    - procurement
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
 This module will store in the invoice line all the historical informations to allow you to compute
 your margin on product. We will always work in company currency and in invoice currency (to respect the OpenERP
 philosophy, as it is done in accounting entries for example). You now have the possibility to open a list 
 view of your products and having the margin computed for a given period of time. 
 
 In the product form, you also will have a computed field that show you the info based on all invoice lines
 historic.
 
 You can use this module in conjonction with the product_cost_incl_bom one to have the right margin 
 computed from BOM costing.
 
 WARNING:
 
 1) The amount of the unit price in company currency in the invoice line is converted with the currency
 rate of the date of the creation/modification of the invoice line (not the invoice date). This choice 
 has been made mainly because the cost price of the product is known at the invoice creation, but we don't 
 have it at the date of the invoice (no historical values in the cost price...) !
 
 
 

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
view_account_invoice_line_filter account.invoice.line.select account.invoice.line search New
view_historical_margin historical.margin.form historical.margin form New
view_invoice_line_form_from_product account.invoice.line.from.product.form account.invoice.line form New
view_invoice_line_tree_from_product account.invoice.line.from.product.tree account.invoice.line tree New
view_product_historical_margin product.product.historical_margin.tree product.product tree New
view_product_historical_margin_form product_historical_margin.form product.product field Inherits product_standard_margin.sale_markup_product_form
Models touched (4)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False)
    The percentage of the relative margin has to be recomputed asit is nor a sum, nor a avg, but a percentage of 2 valuesof the line computed as: margin_relative = margin_absolute / subtotal_company * 100

New fields (0)

No new fields.

Public methods (1)
  • action_open_window(self, cr, uid, ids, context=None)
    Open the historical margin view

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/margin-analysis
GIT
GIThttps://github.com/OCA/margin-analysis.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/margin-analysis/tree/8.0/product_historical_margin
VERSION
VERSION 0.2
CATEGORY
CATEGORYAccounting & Finance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSStéphane Bidoul, Alexandre Fayolle
WEBSITE
WEBSITEhttp://www.camptocamp.com/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:25
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/margin-analysis:
    - product_standard_margin
    - product_replenishment_cost
odoo/odoo:
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - report
    - account
    - analytic
    - board
    - edi
    - email_template
    - sale
    - sales_team
    - web_kanban_sparkline
    - account_voucher
    - procurement
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
 This module will store in the invoice line all the historical informations to allow you to compute
 your margin on product. We will always work in company currency and in invoice currency (to respect the OpenERP
 philosophy, as it is done in accounting entries for example). You now have the possibility to open a list 
 view of your products and having the margin computed for a given period of time. 
 
 In the product form, you also will have a computed field that show you the info based on all invoice lines
 historic.
 
 You can use this module in conjonction with the product_cost_incl_bom one to have the right margin 
 computed from BOM costing.
 
 WARNING:
 
 1) The amount of the unit price in company currency in the invoice line is converted with the currency
 rate of the date of the creation/modification of the invoice line (not the invoice date). This choice 
 has been made mainly because the cost price of the product is known at the invoice creation, but we don't 
 have it at the date of the invoice (no historical values in the cost price...) !
 
 
 

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
view_account_invoice_line_filter account.invoice.line.select account.invoice.line search New
view_historical_margin historical.margin.form historical.margin form New
view_invoice_line_form_from_product account.invoice.line.from.product.form account.invoice.line form New
view_invoice_line_tree_from_product account.invoice.line.from.product.tree account.invoice.line tree New
view_product_historical_margin product.product.historical_margin.tree product.product tree New
view_product_historical_margin_form product_historical_margin.form product.product field Inherits product_standard_margin.sale_markup_product_form
Models touched (4)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False)
    The percentage of the relative margin has to be recomputed asit is nor a sum, nor a avg, but a percentage of 2 valuesof the line computed as: margin_relative = margin_absolute / subtotal_company * 100

New fields (0)

No new fields.

Public methods (1)
  • action_open_window(self, cr, uid, ids, context=None)
    Open the historical margin view

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/margin-analysis
GIT
GIThttps://github.com/OCA/margin-analysis.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/margin-analysis/tree/7.0/product_historical_margin
VERSION
VERSION 0.2
CATEGORY
CATEGORYAccounting & Finance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSYannick Vaucher, Alexandre Fayolle, Joel Grand-Guillaume, unknown
WEBSITE
WEBSITEhttp://www.camptocamp.com/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:07:15
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/margin-analysis:
    - product_get_cost_field
    - product_standard_margin
odoo/odoo:
    - product
    - base
    - process
    - web
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - account
    - analytic
    - board
    - edi
    - email_template
    - sale
    - account_voucher
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
 This module will store in the invoice line all the historical informations to
 allow you to compute your margin on product. We will always work in company
 currency and in invoice currency (to respect the OpenERP philosophy, as it is
 done in accounting entries for example). You now have the possibility to open
 a list view of your products and having the margin computed for a given period
 of time.

 In the product form, you also will have a computed field that show you the
 info based on all invoice lines historic.

 You can use this module in conjonction with the product_cost_incl_bom one to
 have the right margin computed from BOM costing.

 WARNING:

 1) The amount of the unit price in company currency in the invoice line is
 converted with the currency rate of the date of the creation/modification of
 the invoice line (not the invoice date). This choice has been made mainly
 because the cost price of the product is known at the invoice creation, but we
 don't have it at the date of the invoice (no historical values in the cost
 price...) !


 

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
view_account_invoice_line_filter account.invoice.line.select account.invoice.line search New
view_historical_margin historical.margin.form historical.margin form New
view_invoice_line_form_from_product account.invoice.line.from.product.form account.invoice.line form New
view_invoice_line_tree_from_product account.invoice.line.from.product.tree account.invoice.line tree New
view_product_historical_margin product.product.historical_margin.tree product.product tree New
view_product_historical_margin_form product_historical_margin.form product.product field Inherits product_standard_margin.sale_markup_product_form
Models touched (4)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False)
    The percentage of the relative margin has to be recomputed as it is nor a sum, nor a avg, but a percentage of 2 valuesof the line computed as: margin_relative = margin_absolute / subtotal_company * 100

New fields (0)

No new fields.

Public methods (1)
  • action_open_window(self, cr, uid, ids, context=None)
    Open the historical margin view

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/margin-analysis
GIT
GIThttps://github.com/OCA/margin-analysis.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/margin-analysis/tree/6.1/product_historical_margin
VERSION
VERSION 0.2
CATEGORY
CATEGORYAccounting & Finance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSAlexandre Fayolle, Joël Grand-Guillaume, unknown, Alexandre Fayolle @ camptocamp, Guewen Baconnier @ Camptocamp, Endian Solutions
WEBSITE
WEBSITEhttp://www.camptocamp.com/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:04:06
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/margin-analysis:
    - product_get_cost_field
    - product_standard_margin
odoo/odoo:
    - product
    - base
    - process
    - decimal_precision
    - account
    - base_setup
    - analytic
    - board
    - edi
    - email_template
    - mail
    - base_tools
    - sale
    - stock
    - procurement
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
 This module will store in the invoice line all the historical informations to allow you to compute
 your margin on product. We will always work in company currency and in invoice currency (to respect the OpenERP
 philosophy, as it is done in accounting entries for example). You now have the possibility to open a list 
 view of your products and having the margin computed for a given period of time. 
 
 In the product form, you also will have a computed field that show you the info based on all invoice lines
 historic.
 
 You can use this module in conjonction with the product_cost_incl_bom one to have the right margin 
 computed from BOM costing.
 
 WARNING:
 
 1) The amount of the unit price in company currency in the invoice line is converted with the currency
 rate of the date of the creation/modification of the invoice line (not the invoice date). This choice 
 has been made mainly because the cost price of the product is known at the invoice creation, but we don't 
 have it at the date of the invoice (no historical values in the cost price...) !
 
 
 

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
view_account_invoice_line_filter account.invoice.line.select account.invoice.line search New
view_historical_margin historical.margin.form historical.margin form New
view_invoice_line_tree_from_product account.invoice.line.from.product.tree account.invoice.line tree New
view_product_historical_margin product.product.historical_margin.tree product.product tree New
view_product_historical_margin_form product_historical_margin.form product.product field Inherits product_standard_margin.sale_markup_product_form
Models touched (4)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • action_open_window(self, cr, uid, ids, context=None)
    Open the historical margin view

New fields (0)

No new fields.

Public methods (0)

No public methods.