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 2ff3cdc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion report_substitute/__manifest__.py
Original file line number Diff line number Diff line change
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
4 changes: 2 additions & 2 deletions report_substitute/models/ir_actions_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ 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(
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(
return super()._render_qweb_pdf(
substitution_report, res_ids=res_ids, data=data
)

Expand Down
2 changes: 1 addition & 1 deletion report_substitute/tests/test_report_substitute.py
Original file line number Diff line number Diff line change
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 2ff3cdc

Please sign in to comment.