[Erp5-report] r31500 kazuhiko - /erp5/trunk/products/ERP5/Document/Amount.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Dec 28 17:10:01 CET 2009


Author: kazuhiko
Date: Mon Dec 28 17:10:00 2009
New Revision: 31500

URL: http://svn.erp5.org?rev=31500&view=rev
Log:
in setConvertedQuantity(), if resource or quantity_unit is missing, do like setQuantity(). it is more consistent with getConvertedQuantity().

Modified:
    erp5/trunk/products/ERP5/Document/Amount.py

Modified: erp5/trunk/products/ERP5/Document/Amount.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Amount.py?rev=31500&r1=31499&r2=31500&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Amount.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Amount.py [utf8] Mon Dec 28 17:10:00 2009
@@ -445,8 +445,10 @@
                                           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):




More information about the Erp5-report mailing list