[MOV] web: move /commands to /core

We move /commands to /core because DebugMenu depends
on /command/command_hook. All the files in /commands depend only
on /core or /commands except for menu_providers which we will move to /menus

X-original-commit: eca8cd478b72d81b2293c22d2c9c41d1f94be16a
Part-of: odoo/odoo#76777
This commit is contained in:
Francois (fge)
2021-09-17 23:59:19 +00:00
parent db7d95eaac
commit e0e4d38cdd
20 changed files with 16 additions and 17 deletions
@@ -1,11 +1,11 @@
/** @odoo-module **/
import { afterEach, afterNextRender, beforeEach, start } from '@mail/utils/test_utils';
import { editSearchBar } from '@web/../tests/core/commands/command_service_tests';
import { click, nextTick, patchWithCleanup, triggerHotkey } from "@web/../tests/helpers/utils";
import { editSearchBar } from '@web/../tests/webclient/commands/command_service_tests';
import { browser } from '@web/core/browser/browser';
import { commandService } from "@web/core/commands/command_service";
import { registry } from "@web/core/registry";
import { commandService } from "@web/webclient/commands/command_service";
const serviceRegistry = registry.category("services");
+1 -2
View File
@@ -101,8 +101,7 @@
],
'project.webclient': [
('include', 'web.assets_backend'),
('remove', 'web/static/src/webclient/menu_service.js'),
('remove', 'web/static/src/webclient/commands/menu_providers.js'),
('remove', 'web/static/src/webclient/menus/*.js'),
# Remove Longpolling bus and packages needed this bus
('remove', 'bus/static/src/js/services/assets_watchdog_service.js'),
@@ -1,7 +1,7 @@
/** @odoo-module **/
import { useCommand } from "@web/core/commands/command_hook";
import { useService } from "@web/core/utils/hooks";
import { useCommand } from "@web/webclient/commands/command_hook";
import { useEnvDebugContext } from "./debug_context";
const { Component } = owl;
@@ -2,7 +2,7 @@
import { _lt } from "@web/core/l10n/translation";
import { registry } from "@web/core/registry";
import { computeAppsAndMenuItems } from "@web/webclient/menu_service";
import { computeAppsAndMenuItems } from "@web/webclient/menus/menu_service";
import { fuzzyLookup } from "@web/core/utils/search";
const { Component } = owl;
@@ -1,7 +1,7 @@
/** @odoo-module **/
import { browser } from "../core/browser/browser";
import { registry } from "../core/registry";
import { browser } from "../../core/browser/browser";
import { registry } from "../../core/registry";
import { session } from "@web/session";
const loadMenusUrl = `/web/webclient/load_menus`;
@@ -2,12 +2,12 @@
import { makeDeferred } from "@mail/utils/deferred/deferred";
import { browser } from "@web/core/browser/browser";
import { CommandPaletteDialog } from "@web/core/commands/command_palette_dialog";
import { commandService } from "@web/core/commands/command_service";
import { dialogService } from "@web/core/dialog/dialog_service";
import { hotkeyService } from "@web/core/hotkeys/hotkey_service";
import { registry } from "@web/core/registry";
import { uiService } from "@web/core/ui/ui_service";
import { CommandPaletteDialog } from "@web/webclient/commands/command_palette_dialog";
import { commandService } from "@web/webclient/commands/command_service";
import { makeTestEnv } from "../../helpers/mock_env";
import { click, getFixture, nextTick, patchWithCleanup, triggerHotkey } from "../../helpers/utils";
import { editSearchBar } from "./command_service_tests";
@@ -2,13 +2,13 @@
import { makeFakeLocalizationService } from "@web/../tests/helpers/mock_services";
import { browser } from "@web/core/browser/browser";
import { useCommand } from "@web/core/commands/command_hook";
import { commandService } from "@web/core/commands/command_service";
import { HotkeyCommandItem } from "@web/core/commands/default_providers";
import { dialogService } from "@web/core/dialog/dialog_service";
import { hotkeyService } from "@web/core/hotkeys/hotkey_service";
import { registry } from "@web/core/registry";
import { uiService, useActiveElement } from "@web/core/ui/ui_service";
import { useCommand } from "@web/webclient/commands/command_hook";
import { commandService } from "@web/webclient/commands/command_service";
import { HotkeyCommandItem } from "@web/webclient/commands/default_providers";
import testUtils from "web.test_utils";
import { clearRegistryWithCleanup, makeTestEnv } from "../../helpers/mock_env";
import { click, getFixture, nextTick, patchWithCleanup, triggerHotkey } from "../../helpers/utils";
+2 -2
View File
@@ -16,7 +16,7 @@ import { viewService } from "@web/views/view_service";
import { actionService } from "@web/webclient/actions/action_service";
import { effectService } from "@web/core/effects/effect_service";
import { hotkeyService } from "@web/core/hotkeys/hotkey_service";
import { menuService } from "@web/webclient/menu_service";
import { menuService } from "@web/webclient/menus/menu_service";
import { WebClient } from "@web/webclient/webclient";
// This import is needed because of it's sideeffects, for exemple :
// web.test_utils easyload xml templates at line : 124:130.
@@ -43,7 +43,7 @@ import Widget from "web.Widget";
import { userService } from "@web/core/user_service";
import { uiService } from "@web/core/ui/ui_service";
import { ClientActionAdapter, ViewAdapter } from "@web/legacy/action_adapters";
import { commandService } from "@web/webclient/commands/command_service";
import { commandService } from "@web/core/commands/command_service";
const { Component, mount, tags } = owl;
@@ -2,7 +2,7 @@
import { browser } from "@web/core/browser/browser";
import { notificationService } from "@web/core/notifications/notification_service";
import { menuService } from "@web/webclient/menu_service";
import { menuService } from "@web/webclient/menus/menu_service";
import { registry } from "@web/core/registry";
import { uiService } from "@web/core/ui/ui_service";
import { actionService } from "@web/webclient/actions/action_service";
@@ -8,7 +8,7 @@ import { uiService } from "@web/core/ui/ui_service";
import { legacyServiceProvider } from "@web/legacy/legacy_service_provider";
import { actionService } from "@web/webclient/actions/action_service";
import { hotkeyService } from "@web/core/hotkeys/hotkey_service";
import { menuService } from "@web/webclient/menu_service";
import { menuService } from "@web/webclient/menus/menu_service";
import { WebClient } from "@web/webclient/webclient";
import { clearRegistryWithCleanup, makeTestEnv } from "../helpers/mock_env";
import { fakeTitleService } from "../helpers/mock_services";