Commit 691da0fc authored by Aurel's avatar Aurel

allow to specify date to create bank account inventory

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18444 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 22ae3584
...@@ -765,7 +765,7 @@ class TestERP5BankingMixin: ...@@ -765,7 +765,7 @@ class TestERP5BankingMixin:
site=site) 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 Create and initialize a bank account for a person
""" """
...@@ -806,10 +806,12 @@ class TestERP5BankingMixin: ...@@ -806,10 +806,12 @@ class TestERP5BankingMixin:
site_value=self.testsite, site_value=self.testsite,
stop_date=DateTime().Date()) stop_date=DateTime().Date())
if inv_date is None:
inv_date = DateTime()
inventory = self.bank_account_inventory.newContent(id=bank_account.getInternalBankAccountNumber(), inventory = self.bank_account_inventory.newContent(id=bank_account.getInternalBankAccountNumber(),
portal_type='Bank Account Inventory', portal_type='Bank Account Inventory',
destination_payment_value=bank_account,) destination_payment_value=bank_account,
stop_date=inv_date)
account_inventory_line_id = 'account_inventory_line_%s' %(self.account_inventory_number,) account_inventory_line_id = 'account_inventory_line_%s' %(self.account_inventory_number,)
inventory_line = inventory.newContent(id=account_inventory_line_id, inventory_line = inventory.newContent(id=account_inventory_line_id,
portal_type='Bank Account Inventory Line', portal_type='Bank Account Inventory Line',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment