Skip to content

Commit

Permalink
[FIX] cmis_report_write: add override to render again to save files i…
Browse files Browse the repository at this point in the history
…n cmis folder

When rendering a report, the files weren't saved in the cmis folder because the override
was missing.
  • Loading branch information
jdoutreloux committed Feb 23, 2024
1 parent c6c1822 commit 34c892a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmis_report_write/models/ir_actions_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 34c892a

Please sign in to comment.