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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrar-seRelated Posts | Respostes | Vistes | Activitat | |
---|---|---|---|---|
|
1
de set. 15
|
8908 | ||
|
2
d’ag. 15
|
5267 | ||
|
0
d’ag. 15
|
3084 | ||
|
1
de març 15
|
400 | ||
|
0
de març 15
|
210 |