Odoo Help


Is it possible to hide/disable Modules menu using a module?

on 3/12/14, 9:01 AM 2,466 views


I am new to openERP and using v-7. I have created couple of modules.

I want to create a module to Hide or Disable Modules menu (and its sub-menu) from the left side.

Right now, this is showing in the Modules menu:

  • Modules
    • Installed Modules
    • Updates
    • Update Modules List
    • Apply Scheduled Upgrades
    • Apps

In /openerp/addons/web/static/src/xml/base.xml this is defined

<t t-name="Menu.secondary">
<div t-foreach="widget.data.data.children" t-as="menu" style="display: none" class="oe_secondary_menu" t-att-data-menu-parent="menu.id">
    <t t-foreach="menu.children" t-as="menu">
        <div class="oe_secondary_menu_section">
            <t t-esc="menu.name"/>
                Shall the section be still clickable ?
                <t t-call="Menu.link"/>
        <t t-call="Menu.secondary.submenu"/>


How do I suppose to extend this in my module or is there any other way of doing this?

Med Said BARA
On 3/12/14, 9:25 AM


You should take a look at the code HERE

My advice is, to never modify an existing module belonging to the core of OpenERP (openerp- server or openerp-addons) !!!

What you can do is, to create a new module (if possible) or at least to make your changes on an extra-module.

HERE you can find an example on how to make some changes on a module. (I've made those changes in order to fix a Bug, but the example is still valide in your case).

Fortunately, this example correspond exactly to your need.

You have to read the code carrefully, and try to understand how the actions are performed, and then make your own changes ... repeat ... and repeat ... again... and again ...

Make your changes only on the modules oerp_no_phoning_home and the web_hideleftmenu, don't modify the files in ..../openerp/addons/web/....

Link to oerp_no_phoning_home.

oerp_no_phoning_home and web_hideleftmenu are a good "place" where you can start learning how to achieve this task ...

If you succeed, then you can create your own module, Which can hide a part, or some parts of the menu, as you wish ...

good luck.

Ray Carnes
On 3/12/14, 9:25 PM

A menu is a standard document (database record) in OpenERP.

Create a new group called 'Nobody'.

Assign the menu to this group.

You can do this in a module by simply using XML to create the group and modify the groups of the menu.

<record id="<the XML ID of your new group>" model="res.groups">
    <field name="name">Nobody</field>

<record id="base.menu_management" model="ir.ui.menu">
    <!-- Use the `ref()` method to resolve the group XML ID -->
    <field name="groups_id" eval="[ref(<the XML ID of your new group>)]"/>

(Note the XML is from memory, so there could be minor typo's)

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

2 follower(s)


Asked: 3/12/14, 9:01 AM
Seen: 2466 times
Last updated: 3/16/15, 8:10 AM