openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #03046
Re: lp:~alejandrosantana/ocb-addons/7.0-ocb-addons-fix-bug-1089229 into lp:ocb-addons
8: OK, this can be changed, yes.
Yet, this comment on code puzzles me:
http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/sale/sale.py#L827
16: Mathematically shouldn't have to (if I am not wrong):
subtotalA = uom_qty * unit_price[for UoM] (<-- Usual calculation, isn't it?)
subtotalB = uos_qty * unit_price[for UoS] =
= (uom_qty * uos_coeff) * (unit_price[for UoM] / uos_coeff) =
= uom_qty * unit_price[for UoM] * (uos_coeff / uos_coeff) =
= uom_qty * unit_price[for UoM] * 1 =
= subtotalA
So no need for further calculations and rounding errors.
If any other calculation should be done, it should be done not at report level, but in a sales or product level, I think.
And this other comment in code seems the way to go to correct it definetely, not only in report, which was my aim:
http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/sale/sale.py#L632
(Same comments since, at least 6.1, but never implemented)
--
https://code.launchpad.net/~alejandrosantana/ocb-addons/7.0-ocb-addons-fix-bug-1089229/+merge/202233
Your team OpenERP Community Backports Team is subscribed to branch lp:ocb-addons.
References