mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
@@ -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(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])
|
||||
|
||||
@@ -57,6 +57,13 @@ class IrActionReport(models.Model):
|
||||
substitution_report.report_name, res_ids, data=data
|
||||
)
|
||||
|
||||
def _render_qweb_pdf(self, report_ref, res_ids=None, data=None):
|
||||
report = self._get_report(report_ref)
|
||||
substitution_report = report.get_substitution_report(res_ids)
|
||||
return super(IrActionReport, self)._render_qweb_pdf(
|
||||
substitution_report, res_ids=res_ids, data=data
|
||||
)
|
||||
|
||||
def report_action(self, docids, data=None, config=True):
|
||||
if docids:
|
||||
if isinstance(docids, models.Model):
|
||||
|
||||
Reference in New Issue
Block a user