[MIG] report_context: Migration to 16.0

This commit is contained in:
AlexPForgeFlow
2023-08-16 10:09:49 +02:00
parent 9ad28eef82
commit 717f79a8c8
4 changed files with 12 additions and 15 deletions

View File

@@ -4,7 +4,7 @@ import json
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):
@@ -13,7 +13,7 @@ class ReportController(report.ReportController):
report = request.env["ir.actions.report"]._get_report_from_name(reportname)
original_context = json.loads(data.get("context", "{}") or "{}")
data["context"] = json.dumps(
report.with_context(original_context)._get_context()
report.with_context(**original_context)._get_context()
)
return super().report_routes(
reportname, docids=docids, converter=converter, **data