Merge PR #587 into 14.0

Signed-off-by pedrobaeza
pull/599/head
OCA-git-bot 2022-02-17 09:39:51 +00:00
commit 85d26b3450
1 changed files with 4 additions and 4 deletions

View File

@ -18,10 +18,10 @@ class ReportAction(models.Model):
report_model = self.env.get(report_model_name)
if report_model is None:
raise UserError(_("%s model was not found") % report_model_name)
return report_model.with_context(
active_model=self.model
).create_xlsx_report( # noqa
docids, data
return (
report_model.with_context(active_model=self.model)
.sudo(False)
.create_xlsx_report(docids, data) # noqa
)
@api.model