Skip to content

Commit

Permalink
[MIG] report_context: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPForgeFlow committed Aug 16, 2023
1 parent 9ad28ee commit 7ecd1d2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion report_context/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Report Context",
"summary": """
Adding context to reports""",
"version": "14.0.1.0.2",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Creu Blanca,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/reporting-engine",
Expand Down
2 changes: 1 addition & 1 deletion report_context/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from odoo.http import request, route

from odoo.addons.web.controllers import main as report
from odoo.addons.web.controllers import report as report


class ReportController(report.ReportController):
Expand Down
12 changes: 5 additions & 7 deletions report_context/data/config_parameter.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data noupdate="1">
<odoo noupdate="1">
<record
id="report_default_context"
model="ir.config_parameter"
forcecreate="True"
>
id="report_default_context"
model="ir.config_parameter"
forcecreate="True"
>
<field name="key">report.default.context</field>
<field name="value">{}</field>
</record>
</data>
</odoo>
4 changes: 2 additions & 2 deletions report_context/models/ir_actions_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ def _get_context(self):
context.update(self.env.context)
return context

def _render(self, res_ids, data=None):
def _render(self, report_ref, res_ids, data=None):
return super(IrActionsReport, self.with_context(self._get_context()))._render(
res_ids, data=data
report_ref, res_ids, data=data
)

def report_action(self, docids, data=None, config=True):
Expand Down

0 comments on commit 7ecd1d2

Please sign in to comment.