Skip to content

Commit

Permalink
[IMP] Open report PDF inline.
Browse files Browse the repository at this point in the history
  • Loading branch information
amh-mw committed Nov 29, 2023
1 parent cf5a343 commit 8f68a1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addons/web/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2015,7 +2015,8 @@ def report_download(self, data, context=None):
if report.print_report_name and not len(obj) > 1:
report_name = safe_eval(report.print_report_name, {'object': obj, 'time': time})
filename = "%s.%s" % (report_name, extension)
response.headers.add('Content-Disposition', content_disposition(filename))
disposition = content_disposition(filename)
response.headers.add('Content-Disposition', re.sub(r'^attachment', 'inline', disposition))
return response
else:
return
Expand Down

0 comments on commit 8f68a1f

Please sign in to comment.