Merge PR #628 into 14.0

Signed-off-by etobella
This commit is contained in:
OCA-git-bot
2022-08-26 20:22:52 +00:00

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})