Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion report_qweb_signer/models/ir_actions_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading