-1

enter image description here highlighted are the submenu item i want to hide in a custom module. here are some changes that i have done on backend side but it does not effect the UI side adding menu in static please click to see

i have added in manifest also here is my manifest file manifest file for module please click to see

here is my js code file where i'm trying to remove the following menu items js code file for removing the menu item please click to see

1 Answers1

0

You can remove the menu items from the registry

Example:

/** @odoo-module **/
import { registry } from "@web/core/registry";
import "@web/webclient/user_menu/user_menu_items";

const user_menuitems = registry.category("user_menuitems");
user_menuitems.remove('documentation');
user_menuitems.remove('support');
user_menuitems.remove('log_out');

Add the js file to the assets entry in the __manifest__.py file:

'assets': {
    'web.assets_backend': [
        "MODULE_NAME/static/src/js/user_menu.js",
     ],
},
Kenly
  • 24,317
  • 7
  • 44
  • 60