Skip to content
Health
65/100
fair
  • Security25/25
    No findings
  • Activity0/25
    Last human commit 122 months ago
  • Required by15/25
    1 module depends on it
  • Maturity25/25
    In 5 Odoo series since 6.1

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
1
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.06 MB
Module directory on disk
Code analysis 8 migration notes 4 models 6 views 0 HTTP endpoints

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...) !

Dependencies

Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
product_historical_margin_report

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

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 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…