Commit 23218888 authored by Aurel's avatar Aurel

change condition to record source trade

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17499 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a453bdbe
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>source_trade = context.getSourceTrade()\n <value> <string>source_trade = context.getSourceTrade()\n
if source_trade is None:\n if source_trade is None or context.getSimulationState() != \'delivered\':\n
destination = context.getDestination()\n destination = context.getDestination()\n
if destination is None:\n if destination is None:\n
return None\n return None\n
...@@ -77,7 +77,7 @@ if source_trade is None:\n ...@@ -77,7 +77,7 @@ if source_trade is None:\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:\n if context.portal_categories.getCategoryValue(site).getVaultType().endswith(\'guichet\') and destination in site:\n
source_trade = site + \'/encaisse_des_billets_et_monnaies/entrante\'\n source_trade = site + \'/encaisse_des_billets_et_monnaies/entrante\'\n
if context.getSimulationState() == \'delivered\':\n if context.getSourceTrade() != source_trade:\n
context.setSourceTrade(source_trade)\n context.setSourceTrade(source_trade)\n
return source_trade\n return source_trade\n
from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Message import Message\n
......
532 533
\ No newline at end of file \ No newline at end of file
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>source_trade = context.getSourceTrade()\n <value> <string>source_trade = context.getSourceTrade()\n
if source_trade is None:\n if source_trade is None or context.getSimulationState() != \'delivered\':\n
user_id = context.Base_getLastUserIdByTransition(workflow_id=\'check_payment_workflow\', transition_id=\'deliver_action\')\n user_id = context.Base_getLastUserIdByTransition(workflow_id=\'check_payment_workflow\', transition_id=\'deliver_action\')\n
if user_id is not None:\n if user_id is not None:\n
site_list = context.Baobab_getUserAssignedSiteList(user_id=user_id)\n site_list = context.Baobab_getUserAssignedSiteList(user_id=user_id)\n
...@@ -77,7 +77,7 @@ if source_trade is None:\n ...@@ -77,7 +77,7 @@ if source_trade is None:\n
source_trade = site + \'/encaisse_des_billets_et_monnaies/sortante\'\n source_trade = site + \'/encaisse_des_billets_et_monnaies/sortante\'\n
# Save it only once we are sure that the document will not change any more\n # Save it only once we are sure that the document will not change any more\n
# and that we will not have many users trying to do deliver_action\n # and that we will not have many users trying to do deliver_action\n
if context.getSimulationState() == \'delivered\':\n if context.getSourceTrade() != source_trade:\n
context.setSourceTrade(source_trade)\n context.setSourceTrade(source_trade)\n
return source_trade\n return source_trade\n
</string> </value> </string> </value>
......
339 340
\ 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