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

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Dec 20 10:23:50 CET 2007


Author: aurel
Date: Thu Dec 20 10:23:49 2007
New Revision: 18444

URL: http://svn.erp5.org?rev=18444&view=rev
Log:
allow to specify date to create bank account inventory

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=18444&r1=18443&r2=18444&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py (original)
+++ erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py Thu Dec 20 10:23:49 2007
@@ -765,7 +765,7 @@
                                          site=site)
 
 
-  def createBankAccount(self, person, account_id, currency, amount, **kw):
+  def createBankAccount(self, person, account_id, currency, amount, inv_date=None, **kw):
     """
     Create and initialize a bank account for a person
     """
@@ -806,10 +806,12 @@
                                                                                 site_value=self.testsite,
                                                                                 stop_date=DateTime().Date())
 
-      
+    if inv_date is None:
+      inv_date = DateTime()
     inventory = self.bank_account_inventory.newContent(id=bank_account.getInternalBankAccountNumber(),
-                                           portal_type='Bank Account Inventory',
-                                           destination_payment_value=bank_account,)
+                                                       portal_type='Bank Account Inventory',
+                                                       destination_payment_value=bank_account,
+                                                       stop_date=inv_date)
     account_inventory_line_id = 'account_inventory_line_%s' %(self.account_inventory_number,)
     inventory_line = inventory.newContent(id=account_inventory_line_id,
                                           portal_type='Bank Account Inventory Line',




More information about the Erp5-report mailing list