Skip to Content
Menu
This question has been flagged

Hi,

I'm trying to hide a top menu for a new custom group.

But when I assign a user to this group, the menu is always shown !

Please what's the mistake in my code ? Thanks.


<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data noupdate="1">
<record model="ir.module.category" id="module_sales_users">
            <field name="name">Sales Users</field>
        </record>
<record id="sales_simple_user" model="res.groups">
            <field name="name">Simple User</field>
            <field name="category_id" ref="module_sales_users"/>
        </record>
<record id="mail.mail_feeds_main" model="ir.ui.menu" >
            <field name="groups_id" eval="[(3,ref('sales_simple_user'))]"/>
        </record>
</data>
</openerp>
Avatar
Discard
Best Answer

Hi, BKF AEK

     you have to use (invisible="1") in that field which you want to hide.

I hope this will help you.

Avatar
Discard
Author

Hi Hardik,

Where should I put that condition ?

hi, BKF AEK

In a field which you want to hide(its property.).

Author

Sorry, I didn't understand ! in fact I'm new in Odoo, so could you please show me an example using my code ?

<field name="name" invisible="1">Simple User</field>

If you want to hide name field then add this property in the field at where name is declared.

Author

But that is for group name id="sales_simple_user" !! I want to hide the top menu ' Messaging' for this group !

In menu item(which you want to hide) you have to create one group by(res_group="Group Name") and make sure that which user are in this group they can see this menu otherwise not.

Related Posts Replies Views Activity
3
Apr 17
3225
0
Feb 21
2451
0
Feb 18
1980
3
Jun 17
4405
0
Jan 16
2656