Commit 7cba4f89 authored by Aurel's avatar Aurel

some properties need to be retrieved on document and not line

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15098 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dfd7409b
...@@ -68,15 +68,16 @@ ...@@ -68,15 +68,16 @@
<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:\n
# compute vault\n # compute vault\n
document = context.getParentValue()\n
default_currency = "currency_module/%s" %context.Baobab_getPortalReferenceCurrencyID()\n default_currency = "currency_module/%s" %context.Baobab_getPortalReferenceCurrencyID()\n
currency = context.getResource()\n currency = document.getResource()\n
if currency == default_currency:\n if currency == default_currency:\n
vault = \'/encaisse_des_billets_et_monnaies/entrante\'\n vault = \'/encaisse_des_billets_et_monnaies/entrante\'\n
else:\n else:\n
vault_title = (context.getResourceTitle().lower()).replace(\' \', \'_\')\n vault_title = (document.getResourceTitle().lower()).replace(\' \', \'_\')\n
vault = \'/encaisse_des_devises/%s/sortante\' %(vault_title,)\n vault = \'/encaisse_des_devises/%s/sortante\' %(vault_title,)\n
# add it to user defined counter\n # add it to user defined counter\n
user_id = context.Base_getLastUserIdByTransition(workflow_id=\'incident_workflow\', transition_id=\'deliver_action\')\n user_id = document.Base_getLastUserIdByTransition(workflow_id=\'incident_workflow\', transition_id=\'deliver_action\')\n
if user_id is None:\n 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
...@@ -149,6 +150,7 @@ return source_trade\n ...@@ -149,6 +150,7 @@ return source_trade\n
<string>context</string> <string>context</string>
<string>source_trade</string> <string>source_trade</string>
<string>None</string> <string>None</string>
<string>document</string>
<string>default_currency</string> <string>default_currency</string>
<string>currency</string> <string>currency</string>
<string>vault</string> <string>vault</string>
......
...@@ -68,15 +68,16 @@ ...@@ -68,15 +68,16 @@
<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:\n
# compute vault\n # compute vault\n
document = context.getParentValue()\n
default_currency = "currency_module/%s" %context.Baobab_getPortalReferenceCurrencyID()\n default_currency = "currency_module/%s" %context.Baobab_getPortalReferenceCurrencyID()\n
currency = context.getResource()\n currency = document.getResource()\n
if currency == default_currency:\n if currency == default_currency:\n
vault = \'/encaisse_des_billets_et_monnaies/sortante\'\n vault = \'/encaisse_des_billets_et_monnaies/sortante\'\n
else:\n else:\n
vault_title = (context.getResourceTitle().lower()).replace(\' \', \'_\')\n vault_title = (document.getResourceTitle().lower()).replace(\' \', \'_\')\n
vault = \'/encaisse_des_devises/%s/sortante\' %(vault_title,)\n vault = \'/encaisse_des_devises/%s/sortante\' %(vault_title,)\n
# add it to user defined counter\n # add it to user defined counter\n
user_id = context.Base_getLastUserIdByTransition(workflow_id=\'incident_workflow\', transition_id=\'deliver_action\')\n user_id = document.Base_getLastUserIdByTransition(workflow_id=\'incident_workflow\', transition_id=\'deliver_action\')\n
if user_id is None:\n 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
...@@ -149,6 +150,7 @@ return source_trade\n ...@@ -149,6 +150,7 @@ return source_trade\n
<string>context</string> <string>context</string>
<string>source_trade</string> <string>source_trade</string>
<string>None</string> <string>None</string>
<string>document</string>
<string>default_currency</string> <string>default_currency</string>
<string>currency</string> <string>currency</string>
<string>vault</string> <string>vault</string>
......
376 378
\ 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