A. Chandu A. Chandu - 1 year ago 423
Python Question

Hiding menu item in Odoo?

I want to hide menu item in accounting menu this is the full path:
Accounting/Charts/Chart of Taxes . I want this to get hidden so I've created custom xml file.but I'm unable to hide this one. instead of that can i delete this menu item using tag??

can anybody please help me out this? Thanks

Answer Source

Create one group using xml file this must be first added in __openerp__.py.

<?xml version="1.0" encoding="utf-8"?>
    <data noupdate="1">

            <record id="new_group_id" model="res.groups">
                <field name="name">New Group Name</field>
                <field name="category_id" ref="base.module_category_hidden"/>
                <field name="users" eval="[(4, ref('base.user_root'))]"/>


And create another xml file in which update that menu item with that xml code.

<record id="account.menu_action_tax_code_tree" model="ir.ui.menu">
    <field name="groups_id" eval="[(6, 0, [ref('new_group_id')] )]"/>

That is enough to hide the menu item.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download