diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_jumpToAccountingTransaction.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_jumpToAccountingTransaction.xml index d620fb6f0bf7268b4e2ccde175f2932c29e0b0b9..26ca294e9a1186e35de76b804bca3f07f2f6ead6 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_jumpToAccountingTransaction.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_jumpToAccountingTransaction.xml @@ -53,35 +53,21 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string encoding="cdata"><![CDATA[ - -# 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 + <value> <string># Usage: .../Base_jumpToAccountingTransaction?from_entity=1\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 \n -request=context.REQUEST\n -\n -redirect_url = \'%s/accounting_module/view\' % context.getPortalObject().absolute_url()\n -\n -separator = \'?\'\n +redirect_kw = dict(reset=1,\n + ignore_hide_rows=True)\n \n if from_account:\n - redirect_url += \'%snode:list=%s\' % (separator, context.getRelativeUrl())\n - separator = \'&\'\n -\n + redirect_kw[\'node\'] = [context.getRelativeUrl()]\n elif from_entity:\n - redirect_url += \'%sentity=%s\' % (separator, context.getRelativeUrl())\n - separator = \'&\'\n -\n -redirect_url += \'%sreset=1\' % separator\n + redirect_kw[\'entity\'] = context.getRelativeUrl()\n \n -request[ \'RESPONSE\' ].redirect( redirect_url )\n - - -]]></string> </value> +return context.getPortalObject().accounting_module.Base_redirect(\n + \'view\', keep_items=redirect_kw)\n +</string> </value> </item> <item> <key> <string>_code</string> </key> @@ -119,13 +105,12 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n <tuple> <string>from_account</string> <string>from_entity</string> + <string>dict</string> + <string>True</string> + <string>redirect_kw</string> <string>_getattr_</string> <string>context</string> - <string>request</string> - <string>redirect_url</string> - <string>separator</string> - <string>_inplacevar_</string> - <string>_getitem_</string> + <string>_write_</string> </tuple> </value> </item> diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision index 09fef806d925ab6c7d7b6cb51aadc388545f3a45..2d677318be9a7f186911d1213fec0ee5c2361989 100644 --- a/bt5/erp5_accounting/bt/revision +++ b/bt5/erp5_accounting/bt/revision @@ -1 +1 @@ -1035 \ No newline at end of file +1039 \ No newline at end of file