Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
4163 Переглядів

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

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
вер. 15
9022
2
серп. 15
5373
0
серп. 15
3157
1
бер. 15
494
0
бер. 15
268