From dedd899d58d7b34576094428c5ff6de6c9cb9dd0 Mon Sep 17 00:00:00 2001 From: Naglis Jonaitis Date: Sun, 11 Mar 2018 15:35:43 +0200 Subject: [PATCH] [IMP] report_fillpdf, report_xlsx, report_xml: Use content_disposition helper --- report_xlsx/__manifest__.py | 2 +- report_xlsx/controllers/main.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/report_xlsx/__manifest__.py b/report_xlsx/__manifest__.py index 8283dda4..9f7a1bc1 100644 --- a/report_xlsx/__manifest__.py +++ b/report_xlsx/__manifest__.py @@ -9,7 +9,7 @@ 'Odoo Community Association (OCA)', 'website': "http://github.com/oca/reporting-engine", 'category': 'Reporting', - 'version': '11.0.1.0.0', + 'version': '11.0.1.0.1', 'license': 'AGPL-3', 'external_dependencies': { 'python': [ diff --git a/report_xlsx/controllers/main.py b/report_xlsx/controllers/main.py index 3c8c6a4c..79cabdb9 100644 --- a/report_xlsx/controllers/main.py +++ b/report_xlsx/controllers/main.py @@ -2,7 +2,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, request +from odoo.http import content_disposition, route, request import json @@ -35,7 +35,7 @@ class ReportController(report.ReportController): ('Content-Length', len(xlsx)), ( 'Content-Disposition', - 'attachment; filename=' + report.report_file + '.xlsx' + content_disposition(report.report_file + '.xlsx') ) ] return request.make_response(xlsx, headers=xlsxhttpheaders)