Compute price must be inverted to compute quantity

bzr revid: ced-4b1b998ef067228ae66a570a1e95cb756c1e86fc
This commit is contained in:
ced
2007-10-17 13:49:04 +00:00
parent 6125e4ae50
commit 11a1f485cf
+2 -2
View File
@@ -92,9 +92,9 @@ class product_uom(osv.osv):
from_unit, to_unit = uoms[-1], uoms[0]
if from_unit.category_id.id <> to_unit.category_id.id:
return price
amount = price / from_unit.factor
amount = price * from_unit.factor
if to_uom_id:
amount = amount * to_unit.factor
amount = amount / to_unit.factor
return amount
product_uom()