Commit 0cd83b41 authored by Vincent Pelletier's avatar Vincent Pelletier

TestERP5BankingMixin: Use shorter document ids.

Current scheme causes paths to exceed catalog limit.
parent 7117abf0
No related merge requests found
...@@ -1131,8 +1131,7 @@ class TestERP5BankingMixin(ERP5TypeTestCase): ...@@ -1131,8 +1131,7 @@ class TestERP5BankingMixin(ERP5TypeTestCase):
""" """
# we need to have a unique inventory group id by destination # we need to have a unique inventory group id by destination
inventory_group_id = 'inventory_group_%s_%s%s' % \ inventory_group_id = '%s%s' % (destination.getUid(), extra_id)
(destination.getParentValue().getUid(), destination.getId(), extra_id)
if start_date is None: if start_date is None:
start_date = DateTime()-1 start_date = DateTime()-1
if not hasattr(self, inventory_group_id): if not hasattr(self, inventory_group_id):
...@@ -1145,7 +1144,7 @@ class TestERP5BankingMixin(ERP5TypeTestCase): ...@@ -1145,7 +1144,7 @@ class TestERP5BankingMixin(ERP5TypeTestCase):
inventory_group = getattr(self, inventory_group_id) inventory_group = getattr(self, inventory_group_id)
# get/create the inventory based on currency # get/create the inventory based on currency
inventory_id = '%s_inventory_%s' % (inventory_group_id, currency.getId()) inventory_id = 'inventory_%s_%s' % (inventory_group.getUid(), currency.getId())
if not hasattr(self, inventory_id): if not hasattr(self, inventory_id):
inventory = inventory_group.newContent(id=inventory_id, inventory = inventory_group.newContent(id=inventory_id,
portal_type='Cash Inventory', portal_type='Cash Inventory',
......
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