Commit 6b5729a2 authored by Aurel's avatar Aurel

add a parameter in order to no create the complete site category


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10205 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2ea66210
...@@ -426,7 +426,7 @@ class TestERP5BankingMixin: ...@@ -426,7 +426,7 @@ class TestERP5BankingMixin:
price_currency_value=self.currency_2, variation_list=('not_defined',), price_currency_value=self.currency_2, variation_list=('not_defined',),
quantity_unit_value=self.unit) quantity_unit_value=self.unit)
def createFunctionGroupSiteCategory(self): def createFunctionGroupSiteCategory(self, no_site=0):
""" """
Create site group function category that can be used for security Create site group function category that can be used for security
""" """
...@@ -469,64 +469,65 @@ class TestERP5BankingMixin: ...@@ -469,64 +469,65 @@ class TestERP5BankingMixin:
self.paris = self.testsite.newContent(id='paris', portal_type='Category', codification='P1', vault_type='site') self.paris = self.testsite.newContent(id='paris', portal_type='Category', codification='P1', vault_type='site')
self.madrid = self.testsite.newContent(id='madrid', portal_type='Category', codification='S1', vault_type='site') self.madrid = self.testsite.newContent(id='madrid', portal_type='Category', codification='S1', vault_type='site')
for c in self.testsite.getCategoryChildValueList(): if not no_site:
# create bank structure for each agency for c in self.testsite.getCategoryChildValueList():
site = c.getId() # create bank structure for each agency
# surface site = c.getId()
surface = c.newContent(id='surface', portal_type='Category', codification='', vault_type='site/surface') # surface
caisse_courante = surface.newContent(id='caisse_courante', portal_type='Category', codification='', vault_type='site/surface/caisse_courante') surface = c.newContent(id='surface', portal_type='Category', codification='', vault_type='site/surface')
caisse_courante.newContent(id='encaisse_des_billets_et_monnaies', portal_type='Category', codification='', vault_type='site/surface/caisse_courante') caisse_courante = surface.newContent(id='caisse_courante', portal_type='Category', codification='', vault_type='site/surface/caisse_courante')
# create counter for surface caisse_courante.newContent(id='encaisse_des_billets_et_monnaies', portal_type='Category', codification='', vault_type='site/surface/caisse_courante')
for s in ['banque_interne', 'gros_versement', 'gros_payement']: # create counter for surface
s = surface.newContent(id='%s' %(s,), portal_type='Category', codification='', vault_type='site/surface/%s' %(s,)) for s in ['banque_interne', 'gros_versement', 'gros_payement']:
for ss in ['guichet_1', 'guichet_2', 'guichet_3']: s = surface.newContent(id='%s' %(s,), portal_type='Category', codification='', vault_type='site/surface/%s' %(s,))
ss = s.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/surface/%s/guichet' %(s.getId(),)) for ss in ['guichet_1', 'guichet_2', 'guichet_3']:
for sss in ['encaisse_des_billets_et_monnaies',]: ss = s.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/surface/%s/guichet' %(s.getId(),))
sss = ss.newContent(id='%s' %(sss,), portal_type='Category', codification='', vault_type='site/surface/%s/guichet' %(s.getId(),)) for sss in ['encaisse_des_billets_et_monnaies',]:
for ssss in ['entrante', 'sortante']: sss = ss.newContent(id='%s' %(sss,), portal_type='Category', codification='', vault_type='site/surface/%s/guichet' %(s.getId(),))
sss.newContent(id='%s' %(ssss,), portal_type='Category', codification='', vault_type='site/surface/%s/guichet' %(s.getId(),))
for sss in ['encaisse_des_devises',]:
sss = ss.newContent(id='%s' %(sss,), portal_type='Category', codification='', vault_type='site/surface/%s/guichet' %(s.getId(),))
for currency in ['usd']:
sss.newContent(id='%s' %(currency,), portal_type='Category', codification='', vault_type='site/surface/%s' %(ss.getId(),))
for ssss in ['entrante', 'sortante']: for ssss in ['entrante', 'sortante']:
sss.newContent(id='%s' %(ssss,), portal_type='Category', codification='', vault_type='site/surface/%s/guichet' %(s.getId(),)) sss.newContent(id='%s' %(ssss,), portal_type='Category', codification='', vault_type='site/surface/%s/guichet' %(s.getId(),))
# create sort room for sss in ['encaisse_des_devises',]:
salle_tri = surface.newContent(id='salle_tri', portal_type='Category', codification='', vault_type='site/surface/salle_tri') sss = ss.newContent(id='%s' %(sss,), portal_type='Category', codification='', vault_type='site/surface/%s/guichet' %(s.getId(),))
for ss in ['encaisse_des_billets_et_monnaies', 'encaisse_des_billets_recus_pour_ventilation', 'encaisse_des_differences']: for currency in ['usd']:
ss = salle_tri.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/surface/salle_tri') sss.newContent(id='%s' %(currency,), portal_type='Category', codification='', vault_type='site/surface/%s' %(ss.getId(),))
if 'ventilation' in ss.getId(): for ssss in ['entrante', 'sortante']:
for country in ['France', 'Spain']: sss.newContent(id='%s' %(ssss,), portal_type='Category', codification='', vault_type='site/surface/%s/guichet' %(s.getId(),))
if country[0] != c.getCodification()[0]: # create sort room
ss.newContent(id='%s' %(country,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),)) salle_tri = surface.newContent(id='salle_tri', portal_type='Category', codification='', vault_type='site/surface/salle_tri')
# caveau for ss in ['encaisse_des_billets_et_monnaies', 'encaisse_des_billets_recus_pour_ventilation', 'encaisse_des_differences']:
caveau = c.newContent(id='caveau', portal_type='Category', codification='', vault_type='site/caveau') ss = salle_tri.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/surface/salle_tri')
for s in ['auxiliaire', 'reserve', 'externes', 'serre','devises']: if 'ventilation' in ss.getId():
s = caveau.newContent(id='%s' %(s,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s,)) for country in ['France', 'Spain']:
if s.getId() == 'serre': if country[0] != c.getCodification()[0]:
for ss in ['encaisse_des_billets_neufs_non_emis', 'encaisse_des_billets_retires_de_la_circulation','encaisse_des_billets_detruits','encaisse_des_billets_neufs_non_emis_en_transit_allant_a']: ss.newContent(id='%s' %(country,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),))
ss = s.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),)) # caveau
if 'transit' in ss.getId(): caveau = c.newContent(id='caveau', portal_type='Category', codification='', vault_type='site/caveau')
for country in ['France', 'Spain']: for s in ['auxiliaire', 'reserve', 'externes', 'serre','devises']:
if country[0] != c.getCodification()[0]: s = caveau.newContent(id='%s' %(s,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s,))
ss.newContent(id='%s' %(country,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),)) if s.getId() == 'serre':
for ss in ['encaisse_des_billets_neufs_non_emis', 'encaisse_des_billets_retires_de_la_circulation','encaisse_des_billets_detruits','encaisse_des_billets_neufs_non_emis_en_transit_allant_a']:
else: ss = s.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),))
for ss in ['encaisse_des_billets_et_monnaies', 'encaisse_des_externes', if 'transit' in ss.getId():
'encaisse_des_billets_recus_pour_ventilation','encaisse_des_devises']: for country in ['France', 'Spain']:
ss = s.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),)) if country[0] != c.getCodification()[0]:
if 'ventilation' in ss.getId(): ss.newContent(id='%s' %(country,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),))
for country in ['France', 'Spain']:
if country[0] != c.getCodification()[0]: else:
ss.newContent(id='%s' %(country,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),)) for ss in ['encaisse_des_billets_et_monnaies', 'encaisse_des_externes',
if 'devises' in ss.getId(): 'encaisse_des_billets_recus_pour_ventilation','encaisse_des_devises']:
for currency in ['eur','usd']: ss = s.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),))
ss.newContent(id='%s' %(currency,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(ss.getId(),)) if 'ventilation' in ss.getId():
#if ss.getId()=='encaisse_des_devises': for country in ['France', 'Spain']:
# for if country[0] != c.getCodification()[0]:
if s.getId() == 'auxiliaire': ss.newContent(id='%s' %(country,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),))
for ss in ['encaisse_des_billets_a_ventiler_et_a_detruire', 'encaisse_des_billets_ventiles_et_detruits']: if 'devises' in ss.getId():
s.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),)) for currency in ['eur','usd']:
ss.newContent(id='%s' %(currency,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(ss.getId(),))
#if ss.getId()=='encaisse_des_devises':
# for
if s.getId() == 'auxiliaire':
for ss in ['encaisse_des_billets_a_ventiler_et_a_detruire', 'encaisse_des_billets_ventiles_et_detruits']:
s.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),))
def openCounterDate(self, date=None, site=None): def openCounterDate(self, date=None, site=None):
......
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