[FIX] report_xlsx: fixed file name

This commit is contained in:
Mantux11
2022-06-21 09:15:40 +00:00
parent d717791082
commit ffe1751b44

View File

@@ -36,7 +36,7 @@ class ReportController(report.ReportController):
del data["context"]["lang"] del data["context"]["lang"]
context.update(data["context"]) context.update(data["context"])
xlsx = report.with_context(context)._render_xlsx(docids, data=data)[0] xlsx = report.with_context(context)._render_xlsx(docids, data=data)[0]
report_name = report.report_file report_name = report.name
if report.print_report_name and not len(docids) > 1: if report.print_report_name and not len(docids) > 1:
obj = request.env[report.model].browse(docids[0]) obj = request.env[report.model].browse(docids[0])
report_name = safe_eval(report.print_report_name, {"object": obj}) report_name = safe_eval(report.print_report_name, {"object": obj})