[Erp5-report] r8272 - /erp5/trunk/products/ERP5/Document/Inventory.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Jun 30 19:33:00 CEST 2006


Author: aurel
Date: Fri Jun 30 19:32:58 2006
New Revision: 8272

URL: http://svn.erp5.org?rev=8272&view=rev
Log:
replace getInventory by getQuantity

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

Modified: erp5/trunk/products/ERP5/Document/Inventory.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Inventory.py?rev=8272&r1=8271&r2=8272&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Inventory.py (original)
+++ erp5/trunk/products/ERP5/Document/Inventory.py Fri Jun 30 19:32:58 2006
@@ -80,7 +80,7 @@
       node = self.getDestination()
       for movement in self.getMovementList():
         resource =  movement.getResourceValue()
-        if resource is not None and movement.getInventory() not in (None,''):
+        if resource is not None and movement.getQuantity() not in (None,''):
           variation_text = movement.getVariationText()
           if (resource,variation_text) not in resource_and_variation_list:
             resource_and_variation_list.append((resource,variation_text))
@@ -101,7 +101,7 @@
                 sub_variation_list = inventory.sub_variation_text.split('\n')
               category_list = self.getCategoryList()
               if inventory.total_quantity != 0:
-                temp_delivery_line = newTempDeliveryLine(self, 
+                temp_delivery_line = newTempDeliveryLine(self,
                                                          self.getId())
                 kwd['quantity'] = - inventory.total_quantity
                 category_list.append('resource/%s' % inventory.resource_relative_url)
@@ -113,11 +113,10 @@
       object_list = [self]
       self.portal_catalog.catalogObjectList(object_list)
       if len(stock_object_list)==0:
-        # Make sure to remove all lines 
+        # Make sure to remove all lines
         from Products.ERP5Type.Document import newTempBase
         stock_object_list.append(newTempDeliveryLine(self,self.getId(),
                                  uid=self.getUid()))
-      #LOG('stock_object_list',0,[x.__dict__ for x in stock_object_list])
       self.portal_catalog.catalogObjectList(stock_object_list,
            method_id_list=('z_catalog_stock_list',),
            disable_cache=1,check_uid=0)




More information about the Erp5-report mailing list