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

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jan 30 09:47:49 CET 2007


Author: seb
Date: Tue Jan 30 09:47:44 2007
New Revision: 12445

URL: http://svn.erp5.org?rev=12445&view=rev
Log:
make sure to set a right codification on counters

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=12445&r1=12444&r2=12445&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py (original)
+++ erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py Tue Jan 30 09:47:44 2007
@@ -512,9 +512,17 @@
         caisse_courante.newContent(id='billets_mutiles', portal_type='Category', codification='',  vault_type='site/surface/caisse_courante')
         # create counter for surface
         for s in ['banque_interne', 'gros_versement', 'gros_paiement']:
-          s = surface.newContent(id='%s' %(s,), portal_type='Category', codification='',  vault_type='site/surface/%s' %(s,))
+          vault_codification = c.getCodification()
+          if s == 'banque_interne':
+            vault_codification += 'BI'
+          elif s == 'gros_versement':
+            vault_codification += 'GV'
+          elif s == 'gros_paiement':
+            vault_codification += 'GP'
+          s = surface.newContent(id='%s' %(s,), portal_type='Category', codification=vault_codification,  vault_type='site/surface/%s' %(s,))
           for ss in ['guichet_1', 'guichet_2', 'guichet_3']:
-            ss =  s.newContent(id='%s' %(ss,), portal_type='Category', codification='',  vault_type='site/surface/%s/guichet' %(s.getId(),))
+            final_vault_codification = vault_codification + ss[-1]
+            ss =  s.newContent(id='%s' %(ss,), portal_type='Category', codification=final_vault_codification,  vault_type='site/surface/%s/guichet' %(s.getId(),))
             for sss in ['encaisse_des_billets_et_monnaies',]:
               sss =  ss.newContent(id='%s' %(sss,), portal_type='Category', codification='',  vault_type='site/surface/%s/guichet' %(s.getId(),))
               for ssss in ['entrante', 'sortante']:




More information about the Erp5-report mailing list