Skip to content

Commit

Permalink
[MIG] report_substitute: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lef-adhoc committed Dec 15, 2023
1 parent 2055777 commit 68ae4da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion report_substitute/__manifest__.py
Expand Up @@ -6,7 +6,7 @@
"summary": """
This module allows to create substitution rules for report actions.
""",
"version": "16.0.1.0.1",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/reporting-engine",
Expand Down
8 changes: 2 additions & 6 deletions report_substitute/models/ir_actions_report.py
Expand Up @@ -52,16 +52,12 @@ def get_substitution_report_action(self, action, active_ids):
def _render(self, report_ref, res_ids, data=None):
report = self._get_report(report_ref)
substitution_report = report.get_substitution_report(res_ids)
return super(IrActionReport, self)._render(
substitution_report.report_name, res_ids, data=data
)
return super()._render(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
)
return super()._render_qweb_pdf(substitution_report, res_ids=res_ids, data=data)

def report_action(self, docids, data=None, config=True):
if docids:
Expand Down
2 changes: 1 addition & 1 deletion report_substitute/tests/test_report_substitute.py
Expand Up @@ -9,7 +9,7 @@ class TestReportSubstitute(TransactionCase):
def setUp(self):
# In the demo file we create a new report for ir.module.module model
# with a substation rule from the original report action
super(TestReportSubstitute, self).setUp()
super().setUp()
self.action_report = self.env.ref("base.ir_module_reference_print")
self.res_ids = self.env.ref("base.module_base").ids
self.substitution_rule = self.env.ref(
Expand Down

0 comments on commit 68ae4da

Please sign in to comment.