From 34a30d60785b802ab3c33ed1d1aac489bc1ae469 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Wed, 14 Nov 2007 08:42:54 +0000 Subject: [PATCH] allow to specify a start_date when creating an inventory git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17562 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Banking/tests/TestERP5BankingMixin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/product/ERP5Banking/tests/TestERP5BankingMixin.py b/product/ERP5Banking/tests/TestERP5BankingMixin.py index 9dc3664f51..04bae935ce 100644 --- a/product/ERP5Banking/tests/TestERP5BankingMixin.py +++ b/product/ERP5Banking/tests/TestERP5BankingMixin.py @@ -967,19 +967,22 @@ class TestERP5BankingMixin: def createCashInventory(self, source, destination, currency, line_list=[],extra_id='', - reset_quantity=0): + reset_quantity=0, start_date=None): """ Create a cash inventory group """ # we need to have a unique inventory group id by destination + inventory_group_id = 'inventory_group_%s_%s%s' % \ (destination.getParentValue().getUid(),destination.getId(),extra_id) + if start_date is None: + start_date = DateTime() 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=DateTime()) + start_date=start_date) setattr(self, inventory_group_id, inventory_group) else: inventory_group = getattr(self, inventory_group_id) -- 2.30.9