Odoo Help


Get the selected menu in the topbar menu item ?

on 12/10/14, 3:53 AM 707 views


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



| 5 4 7
Bikaner, India

OpenERP Devloper at SunARC Technology

On 12/10/14, 6:45 AM

     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'];        
        /* End */        
        /* Other Code */
    Best way in custom module to override js code and get name

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 12/10/14, 3:53 AM
Seen: 707 times
Last updated: 3/16/15, 8:10 AM