Skip to content

Commit

Permalink
[FIX] report_qweb_encrypt: report_ref in base provides recordset inst…
Browse files Browse the repository at this point in the history
…ead of reportname
  • Loading branch information
atchuthan committed Oct 20, 2023
1 parent 0f8c70c commit 45d4e05
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions report_qweb_encrypt/models/ir_actions_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ class IrActionsReport(models.Model):
help="Python code syntax to gnerate password.",
)

def _render_qweb_pdf(self, reportname, res_ids=None, data=None):
def _render_qweb_pdf(self, report_ref, res_ids=None, data=None):
document, ttype = super()._render_qweb_pdf(
reportname, res_ids=res_ids, data=data
report_ref, res_ids=res_ids, data=data
)
report = self._get_report(report_ref)
if res_ids:
encrypt_password = self._context.get("encrypt_password")
report = self._get_report_from_name(reportname).with_context(
report = self._get_report_from_name(report.report_name).with_context(
encrypt_password=encrypt_password
)
password = report._get_pdf_password(res_ids[:1])
Expand Down

0 comments on commit 45d4e05

Please sign in to comment.