[IMP] *: remove legacy service mappers

This commit removes the legacy service mappers which are useless now.

closes odoo/odoo#136807

Task: 3439226
Related: odoo/enterprise#48015
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
This commit is contained in:
Michael (mcm)
2023-10-04 19:40:16 +00:00
parent f29a09d7d3
commit 2fbc08a197
8 changed files with 1 additions and 51 deletions
@@ -1,16 +0,0 @@
/** @odoo-module **/
import { registry } from "@web/core/registry";
export function makeBusServiceToLegacyEnv(legacyEnv) {
return {
dependencies: ["bus_service"],
start(_, { bus_service }) {
legacyEnv.services["bus_service"] = bus_service;
},
};
}
registry
.category("wowlToLegacyServiceMappers")
.add("bus_service_to_legacy_env", makeBusServiceToLegacyEnv);
@@ -1,16 +0,0 @@
/** @odoo-module **/
import { registry } from "@web/core/registry";
export function makeMultiTabToLegacyEnv(legacyEnv) {
return {
dependencies: ["multi_tab"],
start(_, { multi_tab }) {
legacyEnv.services["multi_tab"] = multi_tab;
},
};
}
registry
.category("wowlToLegacyServiceMappers")
.add("multi_tab_to_legacy_env", makeMultiTabToLegacyEnv);
-1
View File
@@ -126,7 +126,6 @@ Help your customers with this chat, and analyse their feedback.
'web/static/src/views/fields/file_handler.*',
'bus/static/src/*.js',
'bus/static/src/services/**/*.js',
('remove', 'bus/static/src/services/legacy/**/*'),
'bus/static/src/workers/websocket_worker.js',
'bus/static/src/workers/websocket_worker_utils.js',
-1
View File
@@ -190,7 +190,6 @@ For more specific needs, you may also assign custom-defined actions
'bus/static/src/*.js',
'bus/static/src/services/**/*.js',
('remove', 'bus/static/src/services/legacy/**/*'),
'bus/static/src/workers/websocket_worker.js',
'bus/static/src/workers/websocket_worker_utils.js',
@@ -79,13 +79,7 @@ function getOpenFormView(openView) {
* web clients.
*/
function resetRegistries() {
const categories = [
"actions",
"main_components",
"services",
"systray",
"wowlToLegacyServiceMappers",
];
const categories = ["actions", "main_components", "services", "systray"];
for (const name of categories) {
clearRegistryWithCleanup(registry.category(name));
}
@@ -327,10 +327,6 @@ export async function createPublicRoot(RootWidget) {
// add a bunch of mapping services that will redirect service calls from the legacy env
// to the wowl env
serviceRegistry.add("legacy_notification", makeLegacyNotificationService(legacyEnv));
const wowlToLegacyServiceMappers = registry.category('wowlToLegacyServiceMappers').getEntries();
for (const [legacyServiceName, wowlToLegacyServiceMapper] of wowlToLegacyServiceMappers) {
serviceRegistry.add(legacyServiceName, wowlToLegacyServiceMapper(legacyEnv));
}
await whenReady();
const wowlEnv = makeEnv();
@@ -20,10 +20,6 @@ export const legacySetupProm = new Promise((resolve) => {
// add a service to redirect rpc events triggered on the bus in the
// legacy env on the bus in the wowl env
serviceRegistry.add("legacy_notification", makeLegacyNotificationService(legacyEnv));
const wowlToLegacyServiceMappers = registry.category("wowlToLegacyServiceMappers").getEntries();
for (const [legacyServiceName, wowlToLegacyServiceMapper] of wowlToLegacyServiceMappers) {
serviceRegistry.add(legacyServiceName, wowlToLegacyServiceMapper(legacyEnv));
}
await whenReady();
legacyEnv.templates = templates;
legacySetupResolver(legacyEnv);
@@ -57,7 +57,6 @@ export const registryNamesToCloneWithCleanup = [
"main_components",
"view_widgets",
"views",
"wowlToLegacyServiceMappers",
];
export const utils = {
@@ -74,7 +73,6 @@ export const utils = {
clearRegistryWithCleanup(registry.category("favoriteMenu"));
clearRegistryWithCleanup(registry.category("ir.actions.report handlers"));
clearRegistryWithCleanup(registry.category("main_components"));
clearRegistryWithCleanup(registry.category("wowlToLegacyServiceMappers"));
clearRegistryWithCleanup(registry.category("services"));
clearServicesMetadataWithCleanup();