From 28f786917f84c194322b7f211b6d2a775904c25f Mon Sep 17 00:00:00 2001 From: "Michael (mcm)" Date: Mon, 18 Sep 2023 12:38:12 +0200 Subject: [PATCH] [FIX] web: remove override of rpc service closes odoo/odoo#135371 Signed-off-by: David Monjoie (dmo) Signed-off-by: Jinjiu Liu (jili) --- addons/web/static/src/legacy/utils.js | 1 - addons/web/static/tests/legacy/helpers/test_env.js | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/addons/web/static/src/legacy/utils.js b/addons/web/static/src/legacy/utils.js index 27e58530501..0472fbac8cf 100644 --- a/addons/web/static/src/legacy/utils.js +++ b/addons/web/static/src/legacy/utils.js @@ -152,7 +152,6 @@ export function makeLegacyRPCService(legacyEnv) { start(_, { rpc: wowlRPC }) { const rpc = makeLegacyRPC(wowlRPC); legacyEnv.services.ajax = { rpc }; - legacyEnv.services.rpc = rpc; }, }; } diff --git a/addons/web/static/tests/legacy/helpers/test_env.js b/addons/web/static/tests/legacy/helpers/test_env.js index e1dad550054..39c00445893 100644 --- a/addons/web/static/tests/legacy/helpers/test_env.js +++ b/addons/web/static/tests/legacy/helpers/test_env.js @@ -1,7 +1,6 @@ /** @odoo-module **/ import Bus from "@web/legacy/js/core/bus"; - import { buildQuery } from "@web/legacy/js/core/rpc"; import { templates } from "@web/core/assets"; import { renderToString } from "@web/core/utils/render"; const { App, Component } = owl; @@ -41,10 +40,7 @@ hotkey: { add: () => () => {} }, // fake service notification: { notify() {} }, ajax: { rpc }, - rpc(params, options) { - const query = buildQuery(params); - return rpc(query.route, query.params, options); - }, + rpc, ui: { activeElement: document }, // fake service ...env.services, },