mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[MIG] report_xml: Migration to 14.0
This commit is contained in:
committed by
Enric Tobella
parent
09d1d54ee6
commit
98262b1445
@@ -2,7 +2,6 @@
|
||||
# License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html).
|
||||
|
||||
import json
|
||||
import time
|
||||
|
||||
from werkzeug.urls import url_decode
|
||||
|
||||
@@ -32,7 +31,7 @@ class ReportController(report.ReportController):
|
||||
del data["context"]["lang"]
|
||||
context.update(data["context"])
|
||||
|
||||
xml = report.with_context(context).render_qweb_xml(docids, data=data)[0]
|
||||
xml = report.with_context(context)._render_qweb_xml(docids, data=data)[0]
|
||||
xmlhttpheaders = [
|
||||
("Content-Type", "text/xml"),
|
||||
("Content-Length", len(xml)),
|
||||
@@ -75,7 +74,7 @@ class ReportController(report.ReportController):
|
||||
records = request.env[report.model].browse(ids)
|
||||
if report.print_report_name and not len(records) > 1:
|
||||
report_name = safe_eval(
|
||||
report.print_report_name, {"object": records, "time": time}
|
||||
report.print_report_name, {"object": records}
|
||||
)
|
||||
filename = "{}.xml".format(report_name)
|
||||
response.headers.add(
|
||||
|
||||
Reference in New Issue
Block a user