You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
691 B

  1. # Copyright 2018 Eficent Business and IT Consulting Services, S.L.
  2. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
  3. import json
  4. from odoo import http
  5. from odoo.addons.web.controllers.main import serialize_exception
  6. from odoo.addons.web.controllers.main import Reports
  7. class ReportsExtended(Reports):
  8. # HACK of https://github.com/odoo/odoo/pull/24964
  9. @http.route()
  10. @serialize_exception
  11. def index(self, action, token):
  12. action = json.loads(action)
  13. if "data" in action.keys() and action["data"]:
  14. action["datas"] = action["data"]
  15. action = json.dumps(action)
  16. return super(ReportsExtended, self).index(action, token)