Commit 3022df94 authored by Romain Courteaud's avatar Romain Courteaud

Allow to change the format generated by deferred style.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25097 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6bd00647
......@@ -56,6 +56,9 @@
<value> <string>request = container.REQUEST\n
RESPONSE = request.RESPONSE\n
\n
format = request.get(\'format\', \'pdf\')\n
skin_name = request.get(\'skin_name\', \'ODT\')\n
\n
portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
......@@ -74,7 +77,6 @@ if person_value.getDefaultEmailText(\'\') == \'\':\n
active_process = portal.portal_activities.newActiveProcess()\n
user_name = context.portal_membership.getAuthenticatedMember().getUserName()\n
\n
skin_name = \'ODT\' # XXX hardcoded for now\n
tag = \'active-report-%s\' % random.randint(0, 1000)\n
priority = 3\n
\n
......@@ -116,6 +118,7 @@ portal.portal_simulation.activate(activity=\'SQLQueue\', after_tag=tag, priority
request_other=request_other,\n
form_path=form.getPhysicalPath(),\n
user_name=user_name,\n
format=format,\n
)\n
\n
context.activate(activity=\'SQLQueue\', after_tag=tag).getTitle()\n
......@@ -174,6 +177,8 @@ return context.Base_redirect(\'view\', keep_items=dict(\n
<string>container</string>
<string>request</string>
<string>RESPONSE</string>
<string>format</string>
<string>skin_name</string>
<string>context</string>
<string>portal</string>
<string>N_</string>
......@@ -183,7 +188,6 @@ return context.Base_redirect(\'view\', keep_items=dict(\n
<string>dict</string>
<string>active_process</string>
<string>user_name</string>
<string>skin_name</string>
<string>random</string>
<string>tag</string>
<string>priority</string>
......
......@@ -74,7 +74,7 @@ def dummyReportMethod():\n
\n
# XXX Hardcoded format\n
report_data = context.report_view.pt_render(\n
extra_context=dict(options={\'format\': \'pdf\'},\n
extra_context=dict(options={\'format\': format},\n
rendered_report_item_list=[r[1] for r in report_section_list],\n
report_method=dummyReportMethod,\n
form=portal.restrictedTraverse(form_path)))\n
......@@ -106,7 +106,7 @@ portal.portal_notifications.sendMessage(\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>active_process_url, skin_name, localizer_language, title, request_other, form_path, user_name</string> </value>
<value> <string>active_process_url, skin_name, localizer_language, title, request_other, form_path, user_name, format</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
......@@ -134,7 +134,7 @@ portal.portal_notifications.sendMessage(\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>7</int> </value>
<value> <int>8</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -147,6 +147,7 @@ portal.portal_notifications.sendMessage(\n
<string>request_other</string>
<string>form_path</string>
<string>user_name</string>
<string>format</string>
<string>_getattr_</string>
<string>container</string>
<string>request</string>
......
36
\ No newline at end of file
43
\ 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