Commit 263e6610 authored by Sebastien Robin's avatar Sebastien Robin

set more vault type

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16069 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 99b8c67b
...@@ -38,7 +38,6 @@ def isSameSet(a, b): ...@@ -38,7 +38,6 @@ def isSameSet(a, b):
if len(a) != len(b) : return 0 if len(a) != len(b) : return 0
return 1 return 1
class TestERP5BankingMixin: class TestERP5BankingMixin:
""" """
Mixin class for unit test of banking operations Mixin class for unit test of banking operations
...@@ -542,7 +541,7 @@ class TestERP5BankingMixin: ...@@ -542,7 +541,7 @@ class TestERP5BankingMixin:
# get the base category site # get the base category site
self.site_base_category = getattr(self.category_tool, 'site') self.site_base_category = getattr(self.category_tool, 'site')
# add the category testsite in the category site which hold vaults situated in the bank # 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') self.testsite = self.site_base_category.newContent(id='testsite', portal_type='Category',codification='TEST')
created_site_list = [] created_site_list = []
if len(site_list) != 0: if len(site_list) != 0:
if 'paris' in site_list: if 'paris' in site_list:
...@@ -568,6 +567,15 @@ class TestERP5BankingMixin: ...@@ -568,6 +567,15 @@ class TestERP5BankingMixin:
op_vault_type = surface_vault_type.newContent('operations_diverses') op_vault_type = surface_vault_type.newContent('operations_diverses')
guichet_op_vault_type = op_vault_type.newContent('guichet') guichet_op_vault_type = op_vault_type.newContent('guichet')
caveau_vault_type = site_vault_type.newContent('caveau') caveau_vault_type = site_vault_type.newContent('caveau')
auxiliaire_vault_type = caveau_vault_type.newContent('auxiliaire')
auxiliaire_vault_type.newContent('auxiliaire_vault_type')
auxiliaire_vault_type.newContent('encaisse_des_devises')
externe = auxiliaire_vault_type.newContent('encaisse_des_externes')
externe.newContent('transit')
caveau_vault_type.newContent('reserve')
serre = caveau_vault_type.newContent('serre')
serre.newContent('transit')
serre.newContent('retire')
salle_tri = surface_vault_type.newContent('salle_tri') salle_tri = surface_vault_type.newContent('salle_tri')
if not no_site: if not no_site:
...@@ -627,7 +635,8 @@ class TestERP5BankingMixin: ...@@ -627,7 +635,8 @@ class TestERP5BankingMixin:
else: else:
for ss in ['encaisse_des_billets_et_monnaies', 'encaisse_des_externes', for ss in ['encaisse_des_billets_et_monnaies', 'encaisse_des_externes',
'encaisse_des_billets_recus_pour_ventilation','encaisse_des_devises']: 'encaisse_des_billets_recus_pour_ventilation','encaisse_des_devises']:
ss = s.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),)) title = upperCase(ss)
ss = s.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),), title=title)
if 'ventilation' in ss.getId(): if 'ventilation' in ss.getId():
for country in ['madrid', 'paris']: for country in ['madrid', 'paris']:
if country[0] != c.getCodification()[0]: if country[0] != c.getCodification()[0]:
...@@ -641,7 +650,8 @@ class TestERP5BankingMixin: ...@@ -641,7 +650,8 @@ class TestERP5BankingMixin:
# for # for
if s.getId() == 'auxiliaire': if s.getId() == 'auxiliaire':
for ss in ['encaisse_des_billets_a_ventiler_et_a_detruire', 'encaisse_des_billets_ventiles_et_detruits', 'billets_detenus_par_des_tiers', 'encaisse_des_billets_recus_pour_ventilation_venant_de']: for ss in ['encaisse_des_billets_a_ventiler_et_a_detruire', 'encaisse_des_billets_ventiles_et_detruits', 'billets_detenus_par_des_tiers', 'encaisse_des_billets_recus_pour_ventilation_venant_de']:
s.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),)) title = upperCase(ss)
s.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),), title=title)
# Create forreing currency entries in encaisse_des_devises. # Create forreing currency entries in encaisse_des_devises.
for currency in ['usd', ]: for currency in ['usd', ]:
caisse_courante.encaisse_des_devises.newContent(id=currency, portal_type='Category', codification='', vault_type='site/surface/caisse_courante/encaisse_des_devises') caisse_courante.encaisse_des_devises.newContent(id=currency, portal_type='Category', codification='', vault_type='site/surface/caisse_courante/encaisse_des_devises')
......
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