Commit f310c561 authored by Aurel's avatar Aurel

order report : define the deferred portal skin in the parameter list

Depending on the dialog's parameters, the script might get the parameter
in kw or in the request. To prevent this random use, we define it in
the parameter list
parent fcbbd3f8
......@@ -52,13 +52,14 @@
<key> <string>_body</string> </key>
<value> <string>return context.OrderModule_launchOrderReport(\n
report_method_id = "OrderModule_viewOrderReport",\n
deferred_portal_skin = portal_skin,\n
*args,\n
**kw)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>*args, **kw</string> </value>
<value> <string>portal_skin, *args, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -56,7 +56,6 @@ from json import dumps\n
from Products.CMFActivity.ActiveResult import ActiveResult\n
portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
# Check deferred style is present\n
if not \'Deferred\' in portal.portal_skins.getSkinSelections():\n
return context.Base_redirect(\'view\', keep_items=dict(\n
......@@ -91,7 +90,7 @@ active_process.postResult(ActiveResult(\n
request = context.REQUEST\n
context.getPortalObject().portal_skins.changeSkin("Deferred")\n
request.set(\'portal_skin\', "Deferred")\n
deferred_portal_skin = kw.get(\'portal_skin\')\n
assert deferred_portal_skin is not None, "No deferred portal skin found in parameters"\n
request.set(\'deferred_portal_skin\', deferred_portal_skin)\n
\n
kw[\'deferred_style\'] = 1\n
......@@ -108,7 +107,7 @@ return context.Base_activateReport(\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>report_method_id, *args, **kw</string> </value>
<value> <string>report_method_id, deferred_portal_skin, *args, **kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</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