Hi All
For odoo15 remove/add user menu follow this.
JS:
/** @odoo-module **/
import { UserMenu } from "@web/webclient/user_menu/user_menu";
import { patch } from "@web/core/utils/patch";
import { registry } from "@web/core/registry";
import { browser } from "../../core/browser/browser";
const userMenuRegistry = registry.category("user_menuitems");
//For remove menu:
patch(UserMenu.prototype, "Your custom module name.UserMenu", {
setup() {
this._super.apply(this, arguments);
userMenuRegistry.remove("documentation");
},
});
//For add menu:
function documentationItemNew(env) {
const documentationURL = "https://www.odoo.com/documentation/16.0";
return {
type: "item",
id: "documentation",
description: env._t("New Documentation"),
href: documentationURL,
callback: () => {
browser.open(documentationURL, "_blank");
},
sequence: 10,
};
}
registry.category("user_menuitems").add("documentation", documentationItemNew);
Manifest:
'assets': {'web.assets_backend': ['Your custom module name/static/src/js/menu.js']},
Please check this file for more:
/web/static/src/webclient/user_menu/user_menu_items.js
https://apps.odoo.com/apps/modules/14.0/odoo-debrand-11/ check this module
hi midhun m m, my query in 15 version and you shared me link of 14 verison
Thanks for reply :)
Did you get the solution?
Hi bro .. did you get the solution of this?