Looks like this was never commited into trunk. Also, the fix proposed raises an error when trying to convert a localized price into float, due to the formatLang(...) passed to get_price_objects method. This happens when that localized format uses a comma for decimal separator instead of a dot.
The problem is in:
[[ formatLang(line.price_subtotal and get_price_objects(formatLang((line.price_unit * line.product_uom_qty / line.product_uos_qty)),line.product_uos_qty) or line.price_subtotal ,digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id)]]
But, even correcting this, there might be some decimal differences with the subtotal calculated on invoices, which is based solely in UoM, not on UoS.
Even more, the round method in get_price_objects rounds to unit, looks like discards any decimal (let's say decimal accuracy = 0). But prices should respect 'Account' decimal accuracy, which is normally 2.
Looks like this was never commited into trunk. Also, the fix proposed raises an error when trying to convert a localized price into float, due to the formatLang(...) passed to get_price_objects method. This happens when that localized format uses a comma for decimal separator instead of a dot. line.price_ subtotal and get_price_ objects( formatLang( (line.price_ unit * line.product_ uom_qty / line.product_ uos_qty) ),line. product_ uos_qty) or line.price_subtotal ,digits= get_digits( dp='Account' ), currency_ obj=o.pricelist _id.currency_ id)]]
The problem is in:
[[ formatLang(
But, even correcting this, there might be some decimal differences with the subtotal calculated on invoices, which is based solely in UoM, not on UoS.
Even more, the round method in get_price_objects rounds to unit, looks like discards any decimal (let's say decimal accuracy = 0). But prices should respect 'Account' decimal accuracy, which is normally 2.
So, the root of this bug goes deeper and will not be really well solved till UoS is well implemeted into OpenERP, which should be done in core, not in any extension module. There are even some "TO-DO" and "FIX-ME" comments in the code since, at least 6.1, never corrected. Take a look to: bazaar. launchpad. net/~openerp/ openobject- addons/ trunk/view/ head:/sale/ sale.py# L632 bazaar. launchpad. net/~openerp/ openobject- addons/ trunk/view/ head:/sale/ sale.py# L827
http://
http://
There is where the real bug lies: a feature not completely implemented.