From ea851cda8246302a99a6ee6477153c3ffe5dbf2d Mon Sep 17 00:00:00 2001 From: hda Date: Fri, 13 Sep 2024 15:29:08 +0200 Subject: [PATCH] [IMP] add missing _is_report_type_signable to allow signing other types of pdf --- report_qweb_signer/models/ir_actions_report.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/report_qweb_signer/models/ir_actions_report.py b/report_qweb_signer/models/ir_actions_report.py index 77a85693c7..3d1bb03aee 100644 --- a/report_qweb_signer/models/ir_actions_report.py +++ b/report_qweb_signer/models/ir_actions_report.py @@ -34,9 +34,13 @@ def _normalize_filepath(path): class IrActionsReport(models.Model): _inherit = "ir.actions.report" + def _is_report_type_signable(self): + self.ensure_one() + return self.report_type == "qweb-pdf" + def _certificate_get(self, report, res_ids): """Obtain the proper certificate for the report and the conditions.""" - if report.report_type != "qweb-pdf": + if not report._is_report_type_signable(): return False company_id = self.env.company.id if res_ids: