Commit d0dae4c1 authored by Rafael Monnerat's avatar Rafael Monnerat

Used button instead link at Report button. This was required to save selection.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20894 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a9cfd2c3
......@@ -70,7 +70,7 @@ N_ = portal.Base_translateString\n
preserved_parameters={\'form_id\': form_id, \'cancel_url\': cancel_url}\n
request = context.REQUEST\n
\n
# prevent lose checked itens after click to print\n
# prevent lose checked itens after select action\n
# For backward compatibility, do nothing if\n
# Base_updateListboxSelection cannot be found.\n
Base_updateListboxSelection = getattr(context, \'Base_updateListboxSelection\', None)\n
......@@ -83,7 +83,8 @@ if len(Base_doAction) == 0:\n
doAction0 = Base_doAction[0]\n
\n
kw.update(request.form)\n
context.ERP5Site_prepareAction(**kw)\n
# Using Base_updateListboxSelection instead\n
#context.ERP5Site_prepareAction(**kw)\n
\n
# If this is an object, a workflow or a folder, then jump to that view\n
if doAction0 in (\'object\', \'workflow\', \'folder\'):\n
......@@ -189,7 +190,6 @@ return context.ERP5Site_redirect(redirect_url, keep_items=preserved_parameters,
<string>len</string>
<string>_getitem_</string>
<string>doAction0</string>
<string>_apply_</string>
<string>redirect_url</string>
<string>_write_</string>
<string>new_id</string>
......@@ -201,6 +201,7 @@ return context.ERP5Site_redirect(redirect_url, keep_items=preserved_parameters,
<string>preference</string>
<string>new_content_list</string>
<string>new_content_id</string>
<string>_apply_</string>
</tuple>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</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>request = container.REQUEST\n
kw.update(request.form)\n
\n
# Base_updateListboxSelection cannot be found.\n
Base_updateListboxSelection = getattr(context, \'Base_updateListboxSelection\', None)\n
if Base_updateListboxSelection is not None:\n
Base_updateListboxSelection()\n
\n
new_print_action_list = context.Base_fixDialogActions(\n
context.Base_filterDuplicateActions(\n
context.portal_actions.listFilteredActionsFor(context)), \'object_report\')\n
\n
if new_print_action_list:\n
return context.ERP5Site_redirect(new_print_action_list[0][\'url\'],\n
keep_items={\'form_id\': form_id,\n
\'cancel_url\': cancel_url,\n
\'dialog_category\': \'object_report\'}, **kw)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form_id, cancel_url, **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>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>form_id</string>
<string>cancel_url</string>
<string>kw</string>
<string>_getattr_</string>
<string>container</string>
<string>request</string>
<string>getattr</string>
<string>context</string>
<string>None</string>
<string>Base_updateListboxSelection</string>
<string>new_print_action_list</string>
<string>_apply_</string>
<string>_getitem_</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>Base_doReport</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -284,12 +284,11 @@
<span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Import / Export</span>\n
</a>\n
<a tal:condition="report_actions" class="report" title="Report"\n
tal:attributes="href python: portal.ERP5Site_renderCustomLink(report_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_report\')"\n
i18n:attributes="title" i18n:domain="ui">\n
<button tal:condition="report_actions" class="report" type="submit" name="Base_doReport:method" title="Report"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Report</span>\n
</a>\n
</button>\n
<a tal:condition="fast_input_actions" class="fast_input" title="Fast Input"\n
tal:attributes="href python: portal.ERP5Site_renderCustomLink(fast_input_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_fast_input\')"\n
i18n:attributes="title" i18n:domain="ui">\n
......
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