Members mailing list archives

members@odoo-community.org

Re: [V8][PORT] margin-analysis (product_get_cost_field / product_standard_margin)

by
Camptocamp SA, Frédéric Clementi
- 23/07/2015 07:35:03
Alexis, 

just a warning... when we worked on these modules with Joel I remember (but my memory is not that good) that we struggled on how to treat the std_price in multicurrency and multicompany environnement. 
ie : 2 companies one in EUR, one in CHF where products are shared between the 2...so the std_price field.

At the time, Joel found a hack with the price type (OPW + big launchpad MP) I think but it is obsolet now.
So we must apply the correct conversion rate according the the use case. (BTW our hypothesis was : the currency rate date we used for std_price was the date of the invoice validation...not perfect but acceptable I think)

About rewriting the modules, I cannot juge but I wonder if it still necessary to store the std_price in the invoice line since it is already stored in the quant and the BI could do calculations on the fly (perf issues?)

Anyway, the most important is to keep all yaml tests since we spend more time on these than coding modules.