Commit d24d57c3 authored by Jérome Perrin's avatar Jérome Perrin

- don't force format to pdf, if it's empty, it means no conversion

- try to keep the report context, unless it's the portal which is not an active object

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26201 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c60346e4
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<value> <string>request = container.REQUEST\n <value> <string>request = container.REQUEST\n
RESPONSE = request.RESPONSE\n RESPONSE = request.RESPONSE\n
\n \n
format = request.get(\'format\', \'pdf\') or \'pdf\'\n format = request.get(\'format\', \'\')\n
skin_name = request.get(\'deferred_portal_skin\', \'ODT\') or \'ODT\'\n skin_name = request.get(\'deferred_portal_skin\', \'ODT\') or \'ODT\'\n
\n \n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
...@@ -112,7 +112,12 @@ for idx, report_section in enumerate(report_section_list):\n ...@@ -112,7 +112,12 @@ for idx, report_section in enumerate(report_section_list):\n
report_section_idx=idx,\n report_section_idx=idx,\n
request_other=request_other)\n request_other=request_other)\n
\n \n
portal.portal_simulation.activate(activity=\'SQLQueue\', after_tag=tag, priority=priority).Base_report(\n activity_context = context\n
if activity_context == portal:\n
# portal is not an active object\n
activity_context = portal.portal_simulation\n
\n
activity_context.activate(activity=\'SQLQueue\', after_tag=tag, priority=priority).Base_report(\n
active_process_url=active_process.getRelativeUrl(),\n active_process_url=active_process.getRelativeUrl(),\n
skin_name=skin_name,\n skin_name=skin_name,\n
localizer_language=localizer_language,\n localizer_language=localizer_language,\n
...@@ -203,6 +208,7 @@ return context.Base_redirect(\'view\', keep_items=dict(\n ...@@ -203,6 +208,7 @@ return context.Base_redirect(\'view\', keep_items=dict(\n
<string>idx</string> <string>idx</string>
<string>report_section</string> <string>report_section</string>
<string>doc</string> <string>doc</string>
<string>activity_context</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
49 50
\ 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