Search code examples
pythonxmlodooodoo-8

Why do we have to create a new group to hide a menuitem from all users in Odoo v8?


I was just wondering why we have to apply this solution to hide an existing menuitem from all users (administrator with technical features included):

Remove or hide a menu item in Odoo

I mean, can anyone explain me why this does not work?

<record id="stock_account.menu_action_history_tree" model="ir.ui.menu">
    <field name="groups_id" eval="[(6, 0, [])]"/>
</record>

After this, if I go to the interface and check this menuitem record in the technical features section, I can see that the groups_id many2many list is empty. So, why is the administrator still able to see it?


Solution

  • I think you have to make action false to hide the menutitem, This helps

    <record id="stock_account.menu_action_history_tree" model="ir.ui.menu">
        <field name="action" eval="False"/>
    </record>