From a0ca57b41c8d3be9b9470bb470a553085cbc8f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Tue, 4 Dec 2007 08:08:37 +0000 Subject: [PATCH] change way to build account inventory to follow last changes git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17987 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../ERP5Banking/tests/TestERP5BankingMixin.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/product/ERP5Banking/tests/TestERP5BankingMixin.py b/product/ERP5Banking/tests/TestERP5BankingMixin.py index c3716c2895..ef3033d915 100644 --- a/product/ERP5Banking/tests/TestERP5BankingMixin.py +++ b/product/ERP5Banking/tests/TestERP5BankingMixin.py @@ -793,19 +793,21 @@ class TestERP5BankingMixin: 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', - portal_type='Bank Account Inventory', - source=None, + self.bank_account_inventory = self.bank_account_inventory_module.newContent(id='account_inventory_group', + portal_type='Bank Account Inventory Group', site_value=self.testsite, - destination = "account_module/bank_account", stop_date=DateTime().Date()) account_inventory_line_id = 'account_inventory_line_%s' %(self.account_inventory_number,) 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) + portal_type='Bank Account Inventory', + destination_payment_value=bank_account,) + + inventory_line = inventory.newContent(id='line', + portal_type='Bank Account Inventory Line', + resource_value=currency, + quantity=amount) + # deliver the inventory if inventory.getSimulationState()!='delivered': @@ -980,7 +982,6 @@ class TestERP5BankingMixin: if not hasattr(self, inventory_group_id): inventory_group = self.cash_inventory_module.newContent(id=inventory_group_id, portal_type='Cash Inventory Group', - source=None, destination_value=destination, start_date=start_date) setattr(self, inventory_group_id, inventory_group) -- 2.30.9