mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[MIG] report_context: Migration to 16.0
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user