Hello,
how to get the value of the text in the selected menu in the topbar menu item ? for eg when i click on sales i have sales, when i click on Events i have events
Hello,
how to get the value of the text in the selected menu in the topbar menu item ? for eg when i click on sales i have sales, when i click on Events i have events
In the web/static/src/js/chrome.js File
using the below code to read name
menu_click: function(id, needaction) {
if (!id) { return; }
/* To Read Menu Name */
var func = new instance.web.Model("ir.ui.menu").get_func("read");
func(id,["name"]).then(function(res) {
var menu_name = res['name'];
alert(menu_name);
/* End */
});
/* Other Code */
},
Best way in custom module to override js code and get name
Opret en konto i dag for at få glæde af eksklusive funktioner, og bliv en del af vores skønne fællesskab!
Tilmeld dig| Relaterede indlæg | Besvarelser | Visninger | Aktivitet | |
|---|---|---|---|---|
|
1
sep. 15
|
11438 | |||
|
2
aug. 15
|
7433 | |||
|
0
aug. 15
|
4974 | |||
|
2
mar. 15
|
2242 | |||
|
0
mar. 15
|
2021 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.