Merge PR #588 into 15.0

Signed-off-by pedrobaeza
pull/597/head
OCA-git-bot 2022-02-17 15:50:36 +00:00
commit 18fde97f22
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) report_model = self.env.get(report_model_name)
if report_model is None: if report_model is None:
raise UserError(_("%s model was not found") % report_model_name) raise UserError(_("%s model was not found") % report_model_name)
return report_model.with_context( return (
active_model=self.model report_model.with_context(active_model=self.model)
).create_xlsx_report( # noqa .sudo(False)
docids, data .create_xlsx_report(docids, data) # noqa
) )
@api.model @api.model