Skip to content

Commit

Permalink
[9.0][report_custom_filename] Remove simplejson dependency.
Browse files Browse the repository at this point in the history
Currently this dependency was not listed under `external_dependencies`, and violates OCA/maintainer-quality-tools#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.
  • Loading branch information
yajo committed Dec 19, 2016
1 parent 7f31412 commit 73c9457
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions report_custom_filename/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Contributors
------------

* Holger Brunn <[email protected]>
* Jairo Llopis <[email protected]>

Icon
----
Expand Down
4 changes: 2 additions & 2 deletions report_custom_filename/controllers/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright 2014 Therp BV (<http://therp.nl>).
# 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
Expand All @@ -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')
Expand Down

0 comments on commit 73c9457

Please sign in to comment.