[Erp5-report] r18270 - /erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Dec 12 17:08:42 CET 2007


Author: aurel
Date: Wed Dec 12 17:08:41 2007
New Revision: 18270

URL: http://svn.erp5.org?rev=18270&view=rev
Log:
allow to defined a quantity factor for cash inventory line

Modified:
    erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py

Modified: erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py?rev=18270&r1=18269&r2=18270&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py (original)
+++ erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py Wed Dec 12 17:08:41 2007
@@ -970,7 +970,7 @@
 
 
   def createCashInventory(self, source, destination, currency, line_list=[],extra_id='',
-                          reset_quantity=0, start_date=None):
+                          reset_quantity=0, start_date=None, quantity_factor=1):
     """
     Create a cash inventory group
     """
@@ -1015,7 +1015,8 @@
                                  line['variation_value'],
                                  line['quantity'],
                                  variation_list=variation_list,
-                                 reset_quantity=reset_quantity)
+                                 reset_quantity=reset_quantity,
+                                 quantity_factor=quantity_factor)
     # deliver the inventory
     if inventory.getSimulationState()!='delivered':
       inventory.deliver()
@@ -1024,7 +1025,7 @@
 
   def addCashLineToDelivery(self, delivery_object, line_id, line_portal_type, resource_object,
           variation_base_category_list, variation_category_list, resource_quantity_dict,
-          variation_list=None, reset_quantity=0):
+          variation_list=None, reset_quantity=0, quantity_factor=1):
     """
     Add a cash line to a delivery
      """
@@ -1062,7 +1063,7 @@
         quantity = resource_quantity_dict[variation]
         if reset_quantity:
           quantity = 0
-        cell.setQuantity(quantity)
+        cell.setQuantity(quantity*quantity_factor)
 
 
   def checkResourceCreated(self):




More information about the Erp5-report mailing list