projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6125e4a
)
Compute price must be inverted to compute quantity
author
ced
<>
Wed, 17 Oct 2007 13:49:04 +0000
(13:49 +0000)
committer
ced
<>
Wed, 17 Oct 2007 13:49:04 +0000
(13:49 +0000)
bzr revid: ced-
4b1b998ef067228ae66a570a1e95cb756c1e86fc
addons/product/product.py
patch
|
blob
|
history
diff --git
a/addons/product/product.py
b/addons/product/product.py
index
751836f
..
4e28dab
100644
(file)
--- a/
addons/product/product.py
+++ b/
addons/product/product.py
@@
-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()