Commit b9c953c3 authored by Aurel's avatar Aurel

defined hq category at site level and not testsite one


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15902 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e5317e55
......@@ -543,14 +543,17 @@ class TestERP5BankingMixin:
self.site_base_category = getattr(self.category_tool, 'site')
# add the category testsite in the category site which hold vaults situated in the bank
self.testsite = self.site_base_category.newContent(id='testsite', portal_type='Category',codification='TEST',vault_type='site')
created_site_list = []
if len(site_list) != 0:
if 'paris' in site_list:
self.paris = self.testsite.newContent(id='paris', portal_type='Category', codification='P10', vault_type='site')
created_site_list.append(self.paris)
if 'madrid' in site_list:
self.madrid = self.testsite.newContent(id='madrid', portal_type='Category', codification='S10', vault_type='site')
created_site_list.append(self.madrid)
if 'siege' in site_list:
self.siege = self.testsite.newContent(id='siege', portal_type='Category', codification='HQ1', vault_type='site')
self.siege = self.site_base_category.newContent(id='siege', portal_type='Category', codification='HQ1', vault_type='site')
created_site_list.append(self.siege)
self.vault_type_base_category = getattr(self.category_tool, 'vault_type')
site_vault_type = self.vault_type_base_category.newContent(id='site')
surface_vault_type = site_vault_type.newContent('surface')
......@@ -568,7 +571,7 @@ class TestERP5BankingMixin:
salle_tri = surface_vault_type.newContent('salle_tri')
if not no_site:
for c in self.testsite.getCategoryChildValueList():
for c in created_site_list: #self.testsite.getCategoryChildValueList():
# create bank structure for each agency
site = c.getId()
# surface
......@@ -650,7 +653,7 @@ class TestERP5BankingMixin:
if 'madrid' not in site_list:
self.madrid = self.testsite.newContent(id='madrid', portal_type='Category', codification='S10', vault_type='site')
if 'siege' not in site_list:
self.siege = self.testsite.newContent(id='siege', portal_type='Category', codification='HQ1', vault_type='site')
self.siege = self.site_base_category.newContent(id='siege', portal_type='Category', codification='HQ1', vault_type='site')
def _openDate(self, date=None, site=None, id=None, open=True, container=None, portal_type=None):
if date is None:
......
......@@ -106,11 +106,11 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase):
self.organisation_1 = self.organisation_module.newContent(id='baobab_org', portal_type='Organisation',
function='banking', group='baobab', site='testsite/paris')
self.organisation_2 = self.organisation_module.newContent(id='baobab_org_hq', portal_type='Organisation',
function='banking', group='baobab', site='testsite/siege')
function='banking', group='baobab', site='siege')
# define the user
user_dict = {
'super_user' : [['Manager'], self.organisation_1, 'banking/comptable', 'baobab', 'testsite/paris/surface/banque_interne/guichet_1'],
'hq_super_user' : [['Manager'], self.organisation_2, 'banking/comptable', 'baobab', 'testsite/siege/surface/banque_interne/guichet_1']
'hq_super_user' : [['Manager'], self.organisation_2, 'banking/comptable', 'baobab', 'siege/surface/banque_interne/guichet_1']
}
# call method to create this user
self.createERP5Users(user_dict)
......@@ -168,6 +168,7 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase):
source_total_asset_price=0.0,
destination_total_asset_price=0.0,
description='test',
deponent="user",
destination_value=self.mutilated_banknote_vault
)
self.stepTic()
......@@ -444,7 +445,7 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase):
self.checkBanknoteInventory(node_path=self.hq_maculated_banknote_vault.getRelativeUrl(), quantity=0.0)
def stepCreateHQMutilatedBanknote(self, sequence=None, sequence_list=None,
owner_assigned_counter='site/testsite/siege/surface/banque_interne/guichet_1', **kwd):
owner_assigned_counter='site/siege/surface/banque_interne/guichet_1', **kwd):
"""
Create a mutilated banknote document and check it
"""
......@@ -453,6 +454,7 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase):
source_total_asset_price=0.0,
destination_total_asset_price=0.0,
destination_value=self.hq_mutilated_banknote_vault,
deponent="hq user",
causality_value=self.mutilated_banknote
)
self.hq_mutilated_banknote.edit(source_trade='site/testsite/paris')
......
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