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

nobody at svn.erp5.org nobody at svn.erp5.org
Mon May 29 10:42:32 CEST 2006


Author: aurel
Date: Mon May 29 10:42:29 2006
New Revision: 7515

URL: http://svn.erp5.org?rev=7515&view=rev
Log:
deliver inventory after their creation

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=7515&r1=7514&r2=7515&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py (original)
+++ erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py Mon May 29 10:42:29 2006
@@ -448,7 +448,8 @@
                                           price_currency_value = currency)
     # validate this bank account for payment
     bank_account.validate()
-
+    if amount == 0:
+      return bank_account
     # we need to put some money on this bank account
     if not hasattr(self, 'bank_account_inventory'):
       self.bank_account_inventory = self.bank_account_inventory_module.newContent(id='account_inventory',
@@ -458,11 +459,14 @@
                                                                                 stop_date=DateTime().Date())
 
     account_inventory_line_id = 'account_inventory_lien_%s' %(self.account_inventory_number,)
-    self.bank_account_inventory.newContent(id=account_inventory_line_id,
+    inventory = self.bank_account_inventory.newContent(id=account_inventory_line_id,
                                            portal_type='Bank Account Inventory Line',
                                            resource_value=currency,
                                            destination_payment_value=bank_account,
                                            inventory=amount)
+
+    # deliver the inventory
+    inventory.deliver()
     self.account_inventory_number += 1
     return bank_account
 
@@ -494,6 +498,7 @@
     # mark the check as issued
     check.confirm()
     return check
+
 
   def createCashInventory(self, source, destination, currency, line_list=[]):
     """
@@ -534,8 +539,10 @@
                                  line['variation_id'],
                                  line['variation_value'],
                                  line['quantity'],)
+    # deliver the inventory
+    inventory.deliver()
+    #self.workflow_tool.doActionFor(inventory, 'deliver_action', wf_id='inventory_workflow')
     return inventory_group
-
 
 
   def addCashLineToDelivery(self, delivery_object, line_id, line_portal_type, resource_object,




More information about the Erp5-report mailing list