Browse Source

[IMP] report_fillpdf, report_xlsx, report_xml: Use content_disposition helper

myc-14.0-py3o
Naglis Jonaitis 7 years ago
committed by Enric Tobella
parent
commit
3aecf45d0a
  1. 2
      report_xml/__manifest__.py
  2. 4
      report_xml/controllers/main.py

2
report_xml/__manifest__.py

@ -4,7 +4,7 @@
{
"name": "XML Reports",
"version": "11.0.1.0.0",
"version": "11.0.1.0.1",
"category": "Reporting",
"website": "https://github.com/OCA/reporting-engine",
"author": "Grupo ESOC Ingeniería de Servicios, "

4
report_xml/controllers/main.py

@ -3,7 +3,7 @@
# License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html).
from odoo.addons.web.controllers import main as report
from odoo.http import route
from odoo.http import content_disposition, route
class ReportController(report.ReportController):
@ -23,5 +23,5 @@ class ReportController(report.ReportController):
response.headers.set('Content-length', len(response.data))
response.headers.set(
'Content-Disposition',
'attachment; filename="'+reportname+".xml")
content_disposition(reportname + ".xml"))
return response
Loading…
Cancel
Save