From 73c945758cdcf2dca1c0fc22361b396b0abce58b Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Mon, 19 Dec 2016 09:55:41 +0100 Subject: [PATCH] [9.0][report_custom_filename] Remove simplejson dependency. Currently this dependency was not listed under `external_dependencies`, and violates https://github.com/OCA/maintainer-quality-tools/pull/354, which leads to `ImportError` under some environments. Since it adds no benefit over Python's core `json` implementation, I'm simply removing the dependency. --- report_custom_filename/README.rst | 1 + report_custom_filename/controllers/reports.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/report_custom_filename/README.rst b/report_custom_filename/README.rst index 1d7cff4a..221145d0 100644 --- a/report_custom_filename/README.rst +++ b/report_custom_filename/README.rst @@ -27,6 +27,7 @@ Contributors ------------ * Holger Brunn +* Jairo Llopis Icon ---- diff --git a/report_custom_filename/controllers/reports.py b/report_custom_filename/controllers/reports.py index 33fca19d..22808a00 100644 --- a/report_custom_filename/controllers/reports.py +++ b/report_custom_filename/controllers/reports.py @@ -2,7 +2,7 @@ # Copyright 2014 Therp BV (). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -import simplejson +import json from openerp import http from openerp.addons.web.controllers import main from openerp.addons.mail.models import mail_template @@ -13,7 +13,7 @@ class Reports(main.Reports): @main.serialize_exception def index(self, action, token): result = super(Reports, self).index(action, token) - action = simplejson.loads(action) + action = json.loads(action) context = dict(http.request.context) context.update(action["context"]) report_xml = http.request.session.model('ir.actions.report.xml')