Commit aedb7227 authored by Aurel's avatar Aurel

add new category and fix bug in vault type assignment


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7528 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3d71786a
...@@ -273,6 +273,8 @@ class TestERP5BankingMixin: ...@@ -273,6 +273,8 @@ class TestERP5BankingMixin:
self.cash_status_to_sort = self.cash_status_base_category.newContent(id='to_sort', portal_type='Category') self.cash_status_to_sort = self.cash_status_base_category.newContent(id='to_sort', portal_type='Category')
self.cash_status_cancelled = self.cash_status_base_category.newContent(id='cancelled', portal_type='Category') self.cash_status_cancelled = self.cash_status_base_category.newContent(id='cancelled', portal_type='Category')
self.cash_status_not_defined = self.cash_status_base_category.newContent(id='not_defined', portal_type='Category') self.cash_status_not_defined = self.cash_status_base_category.newContent(id='not_defined', portal_type='Category')
self.cash_status_mutilated = self.cash_status_base_category.newContent(id='mutilated', portal_type='Category')
self.cash_status_retired = self.cash_status_base_category.newContent(id='retired', portal_type='Category')
self.emission_letter_base_category = getattr(self.category_tool, 'emission_letter') self.emission_letter_base_category = getattr(self.category_tool, 'emission_letter')
# add the category k in emission letter that will be used fo banknotes and coins # add the category k in emission letter that will be used fo banknotes and coins
...@@ -360,17 +362,21 @@ class TestERP5BankingMixin: ...@@ -360,17 +362,21 @@ class TestERP5BankingMixin:
ss.newContent(id='%s' %(country,), 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,))
# caveau # caveau
caveau = c.newContent(id='caveau', portal_type='Category', codification='', vault_type='site/caveau') caveau = c.newContent(id='caveau', portal_type='Category', codification='', vault_type='site/caveau')
for s in ['auxiliaire', 'reserve', 'externes']: for s in ['auxiliaire', 'reserve', 'externes', 'serre']:
s = caveau.newContent(id='%s' %(s,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s,)) s = caveau.newContent(id='%s' %(s,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s,))
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']: 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,)) 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', 'encaisse_des_billets_recus_pour_ventilation']: elif s.getId() == 'serre':
ss = s.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s,)) for ss in ['encaisse_des_billets_neufs_non_emis', 'encaisse_des_billets_retires_de_la_circulation','encaisse_des_billets_detruits']:
ss = s.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),))
else:
for ss in ['encaisse_des_billets_et_monnaies', 'encaisse_des_externes', 'encaisse_des_billets_recus_pour_ventilation',]:
ss = s.newContent(id='%s' %(ss,), portal_type='Category', codification='', vault_type='site/caveau/%s' %(s.getId(),))
if 'ventilation' in ss.getId(): if 'ventilation' in ss.getId():
for country in ['France', 'Spain']: for country in ['France', 'Spain']:
if country[0] != c.getCodification()[0]: if country[0] != c.getCodification()[0]:
ss.newContent(id='%s' %(country,), 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(),))
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