diff --git a/cmis_report_write/models/ir_actions_report.py b/cmis_report_write/models/ir_actions_report.py index 4e56d692..24ca49f2 100644 --- a/cmis_report_write/models/ir_actions_report.py +++ b/cmis_report_write/models/ir_actions_report.py @@ -129,6 +129,15 @@ def _render_qweb_pdf(self, report_ref, res_ids, data=None): self.with_context(cmis_report_keys=(report, SAVE_IN_CMIS_MARKER)), )._render_qweb_pdf(report_ref, res_ids, data=data) + @api.model + def _render(self, report_ref, res_ids, data=None): + report = self._get_report(report_ref) + with report.save_in_attachment_if_required(): + return super( + IrActionsReport, + self.with_context(cmis_report_keys=(report, SAVE_IN_CMIS_MARKER)), + )._render(report_ref, res_ids, data=data) + def retrieve_attachment(self, record): if self.attachment != SAVE_IN_CMIS_MARKER: return super().retrieve_attachment(record)