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,8 +445,10 @@ class Amount(Base, Variated):
resource.getDefaultQuantityUnit(),
quantity_unit,
self.getVariationCategoryList())
if quantity is not None:
return self.setQuantity(quantity)
else:
quantity = value
if quantity is not None:
return self.setQuantity(quantity)
security.declareProtected(Permissions.AccessContentsInformation, 'getNetQuantity')
def getNetQuantity(self):
......
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