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:
SamirLADOUI-sa 2026-01-04 15:32:31 +01:00 committed by GitHub
commit 52e2158f54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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':