From d8a76aef551e27cb7f666ed1896e1d89f35c31a7 Mon Sep 17 00:00:00 2001 From: "Xavier BOL (xbo)" Date: Tue, 7 Sep 2021 09:47:46 +0000 Subject: [PATCH] [IMP] project: update the project sharing webclient and assets Before this commit, we add the DebugMenu component in the project sharing webclient but this one is displayed in the menu bar in backend. In project sharing views, we don't display this menu. So, this component is useless in project sharing. This commit removes this component and also the menu_provider file in the assets of project sharing. Related PR: #73341 Part of task-2633229 closes #76098 Related: odoo/enterprise#20662 Signed-off-by: LTU-Odoo --- addons/project/__manifest__.py | 1 + .../static/src/project_sharing/project_sharing.js | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/addons/project/__manifest__.py b/addons/project/__manifest__.py index b717a2fc762..6b99459a883 100644 --- a/addons/project/__manifest__.py +++ b/addons/project/__manifest__.py @@ -102,6 +102,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 Longpolling bus and packages needed this bus ('remove', 'bus/static/src/js/services/assets_watchdog_service.js'), diff --git a/addons/project/static/src/project_sharing/project_sharing.js b/addons/project/static/src/project_sharing/project_sharing.js index cf1affa05eb..380ac46a5b9 100644 --- a/addons/project/static/src/project_sharing/project_sharing.js +++ b/addons/project/static/src/project_sharing/project_sharing.js @@ -1,11 +1,9 @@ /** @odoo-module **/ -import { registry } from '@web/core/registry'; import { useBus, useEffect, useService } from '@web/core/utils/hooks'; import { ActionContainer } from '@web/webclient/actions/action_container'; import { MainComponentsContainer } from "@web/core/main_components_container"; import { useOwnDebugContext } from "@web/core/debug/debug_context"; -import { DebugMenu } from "@web/core/debug/debug_menu"; import { ErrorHandler, NotUpdatable } from "@web/core/utils/components"; import { session } from '@web/session'; @@ -18,15 +16,6 @@ export class ProjectSharingWebClient extends Component { this.user = useService("user"); useService("legacy_service_provider"); useOwnDebugContext({ categories: ["default"] }); - if (this.env.debug) { - registry.category("systray").add( - "web.debug_mode_menu", - { - Component: DebugMenu, - }, - { sequence: 100 } - ); - } useBus(this.env.bus, "ACTION_MANAGER:UI-UPDATED", (mode) => { if (mode !== "new") { this.el.classList.toggle("o_fullscreen", mode === "fullscreen");