[Erp5-report] r15522 - /erp5/trunk/products/ERP5/Tool/SimulationTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Aug 7 14:23:24 CEST 2007


Author: vincent
Date: Tue Aug  7 14:23:24 2007
New Revision: 15522

URL: http://svn.erp5.org?rev=15522&view=rev
Log:
"total_quantity" and "inventory" are alias for the same calculation in inventory request. Always use "total_quantity" so that "inventory" can be removed in the future.

Modified:
    erp5/trunk/products/ERP5/Tool/SimulationTool.py

Modified: erp5/trunk/products/ERP5/Tool/SimulationTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/SimulationTool.py?rev=15522&r1=15521&r2=15522&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/SimulationTool.py (original)
+++ erp5/trunk/products/ERP5/Tool/SimulationTool.py Tue Aug  7 14:23:24 2007
@@ -765,7 +765,7 @@
       if len(result) > 0:
         if len(result) != 1:
           raise ValueError, 'Sorry we must have only one'
-        inventory = result[0].inventory
+        inventory = result[0].total_quantity
         if inventory is not None:
           total_result = inventory
 
@@ -937,7 +937,7 @@
       if src__ :
         return result
 
-      return map(lambda r: (r.node_title, r.inventory), result)
+      return map(lambda r: (r.node_title, r.total_quantity), result)
 
     security.declareProtected(Permissions.AccessContentsInformation,
                               'getCurrentInventoryChart')




More information about the Erp5-report mailing list