Merge pull request #5964 from expsa/samir_akadawi_fix_report_api
[FIX] odex_takaful: select the first element from rendering pdf
This commit is contained in:
commit
52e2158f54
|
|
@ -34,7 +34,7 @@ class ReportController(http.Controller):
|
|||
html = report.with_env(env).with_context(context)._render_qweb_html(docids, data=data)[0]
|
||||
return request.make_response(html)
|
||||
elif converter == 'pdf':
|
||||
pdf = report.with_env(env).with_context(context)._render_qweb_pdf(docids)
|
||||
pdf = report.with_env(env).with_context(context)._render_qweb_pdf(docids)[0]
|
||||
pdfhttpheaders = [('Content-Type', 'application/pdf'), ('Content-Length', len(pdf))]
|
||||
return request.make_response(pdf, headers=pdfhttpheaders)
|
||||
elif converter == 'text':
|
||||
|
|
|
|||
Loading…
Reference in New Issue