TIP: You can type at any time to perform a new search.
Product Historical Margin
product_historical_margin · OCA/margin-analysis
Security findings
Migration considerations
- Imports from the old `openerp.osv.orm` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.osv.orm` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.osv.orm` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.osv` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.tools.translate` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
account_invoice_line— Class 'account_invoice_line' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehistorical_margin— Class 'historical_margin' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehistorical_margin— Class 'historical_margin' declares `_defaults` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourceproduct_product— Class 'product_product' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourceview_invoice_line_tree_from_product— View 'view_invoice_line_tree_from_product' is defined with a `<tree>` root tag: renamed to `<list>` in Odoo 18.0. migration-view-tree-tag · sourceview_product_historical_margin— View 'view_product_historical_margin' is defined with a `<tree>` root tag: renamed to `<list>` in Odoo 18.0. migration-view-tree-tag · source
Migration review checklist, not a compatibility verdict. No target version is selected: apply version-specific advice only when migrating to that version or later.
- Repository
- OCA/margin-analysis · module folder · Try on Runboat
- Module version
- 0.2
- Category
- Accounting & Finance
- Folder size
- 0.06 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- http://www.camptocamp.com/
- Last tracking update
- 2026-08-07 07:17:48
- Authors
- Camptocamp, Odoo Community Association (OCA)
- Maintainers
- Camptocamp
- Committers
- Pedro M. Baeza
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- product_historical_margin_report
- 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 ID | Name | Model | Type | Status |
|---|---|---|---|---|
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 | form | Inherits product_standard_margin.sale_markup_product_form |
HTTP endpoints (0)
No HTTP endpoints found for this module.
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.
Loading…
Loading…
Loading…
Loading…