[IMP] add missing _is_report_type_signable to allow signing other types of pdf

This commit is contained in:
hda
2024-09-13 15:29:08 +02:00
parent 279d873d44
commit ea851cda82

View File

@@ -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: