mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[FIX] report_xlsx: Fix dynamic report download
This commit is contained in:
committed by
Dario Del Zozzo
parent
f3f5131fc0
commit
be4f932076
@@ -90,9 +90,10 @@ class ReportController(report.ReportController):
|
||||
report.print_report_name, {"object": obj, "time": time}
|
||||
)
|
||||
filename = "%s.%s" % (report_name, "xlsx")
|
||||
response.headers.add(
|
||||
"Content-Disposition", content_disposition(filename)
|
||||
)
|
||||
if not response.headers.get("Content-Disposition"):
|
||||
response.headers.add(
|
||||
"Content-Disposition", content_disposition(filename)
|
||||
)
|
||||
return response
|
||||
else:
|
||||
return super(ReportController, self).report_download(data, context)
|
||||
|
||||
Reference in New Issue
Block a user