diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 7c845dd141c..d82f4a85775 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -569,11 +569,6 @@ class Home(http.Controller): def login(self, db, login, key): return login_and_redirect(db, login, key) - @http.route('/jsonrpc', type='json', auth="none") - def jsonrpc(self, service, method, args): - """ Method used by client APIs to contact OpenERP. """ - return openerp.netsvc.dispatch_rpc(service, method, args) - class WebClient(http.Controller): @http.route('/web/webclient/csslist', type='json', auth="none") diff --git a/addons/web/http.py b/addons/web/http.py index f9a7e251453..7105b4a74c1 100644 --- a/addons/web/http.py +++ b/addons/web/http.py @@ -1134,6 +1134,14 @@ def db_monodb(): db = dbs[0] return db.lower() if db else db + +class JsonRpcController(Controller): + + @route('/jsonrpc', type='json', auth="none") + def jsonrpc(self, service, method, args): + """ Method used by client APIs to contact OpenERP. """ + return openerp.netsvc.dispatch_rpc(service, method, args) + def wsgi_postload(): openerp.wsgi.register_wsgi_handler(Root())