Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion report_xlsx/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
report_name = report.name
if report.print_report_name and not len(docids) > 1:
obj = request.env[report.model].browse(docids[0])
report_name = safe_eval(report.print_report_name, {"object": obj})
lang = obj.lang if hasattr(obj, "lang") else request.env.user.lang
report_name = safe_eval(

Check warning on line 43 in report_xlsx/controllers/main.py

View check run for this annotation

Codecov / codecov/patch

report_xlsx/controllers/main.py#L42-L43

Added lines #L42 - L43 were not covered by tests
report.with_context(lang=lang).print_report_name, {"object": obj}
)
xlsxhttpheaders = [
(
"Content-Type",
Expand Down