Commit e3f4cc92 authored by Nicolas Delaby's avatar Nicolas Delaby

if rendered_report_item_list is empty report_method is mandatory by form_view in ODT style.

So add a dummy report_method

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24594 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0109efb6
......@@ -69,10 +69,14 @@ portal.portal_skins.changeSkin(skin_name)\n
report_section_list = [r.getResult() for r in ap.getResultList()]\n
report_section_list.sort(lambda a, b:cmp(a[0], b[0]))\n
\n
def dummyReportMethod():\n
return report_section_list\n
\n
# XXX Hardcoded format\n
report_data = context.report_view.pt_render(\n
extra_context=dict(options={\'format\': \'pdf\'},\n
rendered_report_item_list=[r[1] for r in report_section_list],\n
report_method=dummyReportMethod,\n
form=portal.restrictedTraverse(form_path)))\n
\n
attachment_list = (\n
......@@ -156,6 +160,7 @@ portal.portal_notifications.sendMessage(\n
<string>_getiter_</string>
<string>r</string>
<string>report_section_list</string>
<string>dummyReportMethod</string>
<string>dict</string>
<string>_getitem_</string>
<string>report_data</string>
......
33
\ No newline at end of file
34
\ 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