Skip to content

Commit bbe3e6a

Browse files
committed
[FIX] report_xlsx: keep sudo
Explicit `sudo(False)` is not needed anymore, as Odoo core also removed it from the other QWeb reports (see odoo/odoo@ffc5254)
1 parent 69488d0 commit bbe3e6a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

report_xlsx/models/ir_report.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ def _render_xlsx(self, report_ref, docids, data):
2121
report_sudo = self._get_report(report_ref)
2222
report_model_name = "report.%s" % report_sudo.report_name
2323
report_model = self.env[report_model_name]
24-
ret = (
25-
report_model.with_context(active_model=report_sudo.model)
26-
.sudo(False)
27-
.create_xlsx_report(docids, data) # noqa
28-
)
24+
ret = report_model.with_context(
25+
active_model=report_sudo.model
26+
).create_xlsx_report(
27+
docids, data
28+
) # noqa
2929
if ret and isinstance(ret, (tuple, list)): # data, "xlsx"
3030
report_sudo.save_xlsx_report_attachment(docids, ret[0])
3131
return ret

0 commit comments

Comments
 (0)