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

nobody at svn.erp5.org nobody at svn.erp5.org
Tue May 30 19:30:35 CEST 2006


Author: seb
Date: Tue May 30 19:30:32 2006
New Revision: 7544

URL: http://svn.erp5.org?rev=7544&view=rev
Log:
make sure we can so several inventories for several destination

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=7544&r1=7543&r2=7544&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py (original)
+++ erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py Tue May 30 19:30:32 2006
@@ -467,7 +467,7 @@
                                                                                 destination_value=self.testsite,
                                                                                 stop_date=DateTime().Date())
 
-    account_inventory_line_id = 'account_inventory_lien_%s' %(self.account_inventory_number,)
+    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,
@@ -514,7 +514,8 @@
     Create a cash inventory group
     """
     # we need to have a unique inventory group id by destination
-    inventory_group_id = 'inventory_group_%s' %(destination.getId())
+    inventory_group_id = 'inventory_group_%s_%s' %
+                      (destination.getParentValue().getId(),destination.getId())
     if not hasattr(self, inventory_group_id):
       inventory_group =  self.cash_inventory_module.newContent(id=inventory_group_id,
                                                                portal_type='Cash Inventory Group',
@@ -525,7 +526,7 @@
       inventory_group = getattr(self, inventory_group_id)
 
     # get/create the inventory based on currency
-    inventory_id = 'inventory_%s' %(currency.getId())
+    inventory_id = '%s_inventory_%s' %(inventory_group_id,currency.getId())
     if not hasattr(self, inventory_id):
       inventory = inventory_group.newContent(id=inventory_id,
                                              portal_type='Cash Inventory',




More information about the Erp5-report mailing list