Commit 43f5a275 authored by Jérome Perrin's avatar Jérome Perrin

modernize this script and support empty listboxs

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30787 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c7fc2b1d
...@@ -53,35 +53,21 @@ ...@@ -53,35 +53,21 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string># Usage: .../Base_jumpToAccountingTransaction?from_entity=1\n
# You can use this script to jump to accounting module without making the URL longer.\n
# Like \'erp5/organisation/purchase_order/accounting/view\'.\n
#\n
# Usage: .../Base_jumpToAccountingTransaction?from_entity=1\n
#\n #\n
# Use from_account to display only transaction related to the account you come from, and from_entity if you come from an organisation or person\n # Use from_account to display only transaction related to the account you come from, and from_entity if you come from an organisation or person\n
\n \n
request=context.REQUEST\n redirect_kw = dict(reset=1,\n
\n ignore_hide_rows=True)\n
redirect_url = \'%s/accounting_module/view\' % context.getPortalObject().absolute_url()\n
\n
separator = \'?\'\n
\n \n
if from_account:\n if from_account:\n
redirect_url += \'%snode:list=%s\' % (separator, context.getRelativeUrl())\n redirect_kw[\'node\'] = [context.getRelativeUrl()]\n
separator = \'&\'\n
\n
elif from_entity:\n elif from_entity:\n
redirect_url += \'%sentity=%s\' % (separator, context.getRelativeUrl())\n redirect_kw[\'entity\'] = context.getRelativeUrl()\n
separator = \'&\'\n
\n
redirect_url += \'%sreset=1\' % separator\n
\n \n
request[ \'RESPONSE\' ].redirect( redirect_url )\n return context.getPortalObject().accounting_module.Base_redirect(\n
\'view\', keep_items=redirect_kw)\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -119,13 +105,12 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n ...@@ -119,13 +105,12 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
<tuple> <tuple>
<string>from_account</string> <string>from_account</string>
<string>from_entity</string> <string>from_entity</string>
<string>dict</string>
<string>True</string>
<string>redirect_kw</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>request</string> <string>_write_</string>
<string>redirect_url</string>
<string>separator</string>
<string>_inplacevar_</string>
<string>_getitem_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
1035 1039
\ 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