Commit efee9bed authored by Aurel's avatar Aurel

many changes

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14072 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 66cfbfd2
...@@ -82,7 +82,7 @@ if currency != \'XOF\':\n ...@@ -82,7 +82,7 @@ if currency != \'XOF\':\n
emissionLetter = [\'not_defined\']\n emissionLetter = [\'not_defined\']\n
variation = [\'not_defined\']\n variation = [\'not_defined\']\n
else:\n else:\n
cashStatus = [\'valid\', \'cancelled\', \'to_sort\', \'new_emitted\',\'error\']\n cashStatus = [\'valid\', \'cancelled\', \'to_sort\', \'new_emitted\',\'error\',\'mixed\']\n
emissionLetter = None\n emissionLetter = None\n
variation = context.Baobab_getResourceVintageList(banknote=1, coin=1)\n variation = context.Baobab_getResourceVintageList(banknote=1, coin=1)\n
\n \n
......
...@@ -67,8 +67,9 @@ ...@@ -67,8 +67,9 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>site_list = context.Baobab_getUserAssignedSiteList()\n <value> <string>site_list = context.Baobab_getUserAssignedSiteList()\n
if len(site_list) == 0:\n if len(site_list) == 0:\n
context.log("DestructionSurvey_init", "unabled to determine site")\n from Products.ERP5Type.Message import Message\n
return\n message = Message(domain="ui", message="The owner is not assigned to the right vault.")\n
raise ValueError,message\n
\n \n
site = site_list[0]\n site = site_list[0]\n
\n \n
...@@ -128,6 +129,10 @@ context.setDestination("%s/caveau/auxiliaire/encaisse_des_billets_ventiles_et_de ...@@ -128,6 +129,10 @@ context.setDestination("%s/caveau/auxiliaire/encaisse_des_billets_ventiles_et_de
<string>context</string> <string>context</string>
<string>site_list</string> <string>site_list</string>
<string>len</string> <string>len</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>message</string>
<string>ValueError</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>site</string> <string>site</string>
</tuple> </tuple>
......
...@@ -73,7 +73,8 @@ if user_id is None:\n ...@@ -73,7 +73,8 @@ if user_id is None:\n
return None\n return None\n
site_list = context.Baobab_getUserAssignedSiteList(user_id=user_id)\n site_list = context.Baobab_getUserAssignedSiteList(user_id=user_id)\n
for site in site_list:\n for site in site_list:\n
if context.portal_categories.getCategoryValue(site).getVaultType().endswith(\'guichet\') and (destination in site or site in destination):\n # if context.portal_categories.getCategoryValue(site).getVaultType().endswith(\'guichet\') and (destination in site or site in destination):\n
if context.portal_categories.getCategoryValue(site).getVaultType().endswith(\'guichet\') and destination in site:\n
return site + \'/encaisse_des_billets_et_monnaies/entrante\'\n return site + \'/encaisse_des_billets_et_monnaies/entrante\'\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Message import Message\n
......
...@@ -67,8 +67,9 @@ ...@@ -67,8 +67,9 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>site_list = context.Baobab_getUserAssignedSiteList()\n <value> <string>site_list = context.Baobab_getUserAssignedSiteList()\n
if len(site_list) == 0:\n if len(site_list) == 0:\n
context.log("MonetarySurvey_init", "unabled to determine site")\n from Products.ERP5Type.Message import Message\n
return\n message = Message(domain="ui", message="The owner is not assigned to the right vault.")\n
raise ValueError,message\n
\n \n
site = site_list[0]\n site = site_list[0]\n
site = context.Baobab_getVaultSite(site)\n site = context.Baobab_getVaultSite(site)\n
...@@ -128,6 +129,10 @@ context.setDestination("%s/caveau/auxiliaire/encaisse_des_billets_a_ventiler_et_ ...@@ -128,6 +129,10 @@ context.setDestination("%s/caveau/auxiliaire/encaisse_des_billets_a_ventiler_et_
<string>context</string> <string>context</string>
<string>site_list</string> <string>site_list</string>
<string>len</string> <string>len</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>message</string>
<string>ValueError</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>site</string> <string>site</string>
</tuple> </tuple>
......
...@@ -76,7 +76,7 @@ if emission_letter!=\'not_defined\' and not (emission_letter in site_letter):\n ...@@ -76,7 +76,7 @@ if emission_letter!=\'not_defined\' and not (emission_letter in site_letter):\n
return \'%s/caveau/auxiliaire/encaisse_des_externes\' %(site,)\n return \'%s/caveau/auxiliaire/encaisse_des_externes\' %(site,)\n
elif emission_letter==\'not_defined\':\n elif emission_letter==\'not_defined\':\n
# remaining banknote which are not sorted yet, or cancelled one\n # remaining banknote which are not sorted yet, or cancelled one\n
if not \'ventilation\' in context.getSource():\n if not \'ventilation\' in context.getSource() and (context.getCashStatus() not in (\'mixed\',)):\n
return \'%s/caveau/auxiliaire/encaisse_des_billets_et_monnaies\' %(site,)\n return \'%s/caveau/auxiliaire/encaisse_des_billets_et_monnaies\' %(site,)\n
else:\n else:\n
if context.getCashStatus() in ("mixed", "to_sort"):\n if context.getCashStatus() in ("mixed", "to_sort"):\n
......
...@@ -78,6 +78,10 @@ counter_site = transaction.getSource()\n ...@@ -78,6 +78,10 @@ counter_site = transaction.getSource()\n
caisse_incoming = counter_site + encaisse_billets_et_monnaies_entrante\n caisse_incoming = counter_site + encaisse_billets_et_monnaies_entrante\n
caisse_outgoing = counter_site + encaisse_billets_et_monnaies_sortante\n caisse_outgoing = counter_site + encaisse_billets_et_monnaies_sortante\n
\n \n
# check again that we are in the good accounting date\n
if not transaction.Baobab_checkCounterDateOpen():\n
msg = Message(domain = "ui", message="Transaction not in the good accounting date")\n
raise ValidationFailed, (msg,)\n
\n \n
\n \n
\n \n
...@@ -168,11 +172,11 @@ if amount_total != outgoing_total:\n ...@@ -168,11 +172,11 @@ if amount_total != outgoing_total:\n
<string>counter_site</string> <string>counter_site</string>
<string>caisse_incoming</string> <string>caisse_incoming</string>
<string>caisse_outgoing</string> <string>caisse_outgoing</string>
<string>msg</string>
<string>resource_two</string> <string>resource_two</string>
<string>incoming_total</string> <string>incoming_total</string>
<string>outgoing_total</string> <string>outgoing_total</string>
<string>amount_total</string> <string>amount_total</string>
<string>msg</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Message import Message\n
\n \n
# Purchase Transaction .\n # Purchase Transaction .\n
transaction = state_change.object\n transaction = state_change[\'object\']\n
\n \n
\n \n
# use of the constraint : Test if quantity is multiple of 1000\n # use of the constraint : Test if quantity is multiple of 1000\n
...@@ -156,11 +156,11 @@ elif resource != 0 :\n ...@@ -156,11 +156,11 @@ elif resource != 0 :\n
<string>ValidationFailed</string> <string>ValidationFailed</string>
<string>Products.ERP5Type.Message</string> <string>Products.ERP5Type.Message</string>
<string>Message</string> <string>Message</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>transaction</string> <string>transaction</string>
<string>_getattr_</string>
<string>vliste</string> <string>vliste</string>
<string>len</string> <string>len</string>
<string>_getitem_</string>
<string>vault</string> <string>vault</string>
<string>resource</string> <string>resource</string>
<string>msg</string> <string>msg</string>
......
272 275
\ No newline at end of file \ No newline at end of file
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