Odoo Help

Welcome!

This community 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.

0

Get the selected menu in the topbar menu item ?

By
kaisusr
on 12/10/14, 3:53 AM 644 views

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

0

Prakash

--Prakash--
3173
| 5 4 7
Bikaner, India
--Prakash--

OpenERP Devloper at SunARC Technology

Prakash
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'];        
            alert(menu_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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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