Commit 38eb7c10 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

in setConvertedQuantity(), if resource or quantity_unit is missing, do like...

in setConvertedQuantity(), if resource or quantity_unit is missing, do like setQuantity(). it is more consistent with getConvertedQuantity().


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31500 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dff719d8
...@@ -445,6 +445,8 @@ class Amount(Base, Variated): ...@@ -445,6 +445,8 @@ class Amount(Base, Variated):
resource.getDefaultQuantityUnit(), resource.getDefaultQuantityUnit(),
quantity_unit, quantity_unit,
self.getVariationCategoryList()) self.getVariationCategoryList())
else:
quantity = value
if quantity is not None: if quantity is not None:
return self.setQuantity(quantity) return self.setQuantity(quantity)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment