A. Chandu A. Chandu - 1 month ago 21
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

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

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <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'))]"/>
            </record>

    </data>
</openerp>

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')] )]"/>
</record>

That is enough to hide the menu item.

Comments