Commit c5841155 authored by Sebastien Robin's avatar Sebastien Robin

fixed source and destination in counter rendering

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9546 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b40e97b9
...@@ -99,6 +99,12 @@ else:\n ...@@ -99,6 +99,12 @@ else:\n
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_cash/CashExchange_getBaobabSource</string> </value> <value> <string>Script (Python):/baobab/portal_skins/erp5_banking_cash/CashExchange_getBaobabSource</string> </value>
...@@ -183,4 +189,25 @@ else:\n ...@@ -183,4 +189,25 @@ else:\n
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -69,11 +69,17 @@ ...@@ -69,11 +69,17 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>source = context.getSource()\n <value> <string>source = context.getSource()\n
if \'devise\' in source:\n if source is not None:\n
return "%s/caisse_courante/%s" %("/".join(source.split("/")[:-4]), "/".join(source.split("/")[-2:]))\n if source.endswith(\'/entrante\'):\n
else:\n source = source[:-len(\'/entrante\')]\n
# return "%s/caisse_courante/%s" %("/".join(source.split("/")[:-3]), "/".join(source.split("/")[-1:]))\n if source.endswith(\'/sortante\'):\n
return "%s/caisse_courante/encaisse_des_billets_et_monnaies" %("/".join(source.split("/")[:-4]))\n source = source[:-len(\'/sortante\')]\n
site = context.Baobab_getVaultSite(source).getRelativeUrl()\n
if \'devise\' in source:\n
return "%s/surface/caisse_courante/%s" % (site, "/".join(source.split("/")[-2:]))\n
else:\n
return "%s/surface/caisse_courante/encaisse_des_billets_et_monnaies" % site\n
return source\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -131,7 +137,10 @@ else:\n ...@@ -131,7 +137,10 @@ else:\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>source</string> <string>source</string>
<string>None</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>len</string>
<string>site</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>transaction = state_change[\'object\']\n
\n
# Check getBaobabSource and getBaobabDestination\n
transaction.Base_checkBaobabSourceAndDestination()\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_workflow/counter_rendering_workflow/scripts/validateSourceAndDestination</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>state_change</string>
<string>kw</string>
<string>_getitem_</string>
<string>transaction</string>
<string>_getattr_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>validateSourceAndDestination</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</item> </item>
<item> <item>
<key> <string>script_name</string> </key> <key> <string>script_name</string> </key>
<value> <string></string> </value> <value> <string>validateSourceAndDestination</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
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