[Erp5-report] r7528 - /erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon May 29 16:21:38 CEST 2006


Author: aurel
Date: Mon May 29 16:21:34 2006
New Revision: 7528

URL: http://svn.erp5.org?rev=7528&view=rev
Log:
add new category and fix bug in vault type assignment

Modified:
    erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py

Modified: erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py?rev=7528&r1=7527&r2=7528&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py (original)
+++ erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py Mon May 29 16:21:34 2006
@@ -273,6 +273,8 @@
     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_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')
     # add the category k in emission letter that will be used fo banknotes and coins
@@ -360,17 +362,21 @@
               ss.newContent(id='%s' %(country,), portal_type='Category', codification='',  vault_type='site/caveau/%s' %(s,))
       # 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,))
         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,))
-        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,))
+            s.newContent(id='%s' %(ss,), portal_type='Category', codification='',  vault_type='site/caveau/%s' %(s.getId(),))
+        elif s.getId() == 'serre':
+          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():
             for country in ['France', 'Spain']:
               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):




More information about the Erp5-report mailing list