Skip to Content
Menu
This question has been flagged
9 Replies
3328 Views

I want to Hide Message Menu for My custom users .But its not working..


Here group_insurance_agency is my Custom group 

In my scrurity.xml files is

<record id="group_insurance_agency" model="res.groups">    <field name="name">Agency/ Manager</field></record>


and i tried below code ----------

        <record id="mail.mail_group_root" model="ir.ui.menu">    <field name="groups_id" eval="[(6, 0,[ref('insure_demo_wkf.group_insurance_agency')])]"/></record>


Avatar
Discard

What is the error with this?

Author

Hi axel..above code is not working... I tried with jigesh code then I got an error

Author Best Answer

I tried like.............below code not working


 <record id="mail.mail_feeds_main" model="ir.ui.menu"><field name="groups_id" eval="[(3,ref('group_insurance_agency'))]"/>    </record>
Avatar
Discard
Best Answer

Hello Dep,


Try this :-


<record id="module_name.menu_id" model="ir.ui.menu">

    <field name="groups_id" eval="[(3,ref('custom_group_id'))]"/>

</record>


Hope it works for you.
Thanks,

Avatar
Discard
Author

I got Erorro........... res = self._obj.execute(query, params) ParseError: "null value in column "name" violates not-null constraint DETAIL: Failing row contains (276, null, null, null, f, 2016-04-01 08:57:00.711, null, STOCK_OPEN, 10, null, 1, null, null, 2016-04-01 08:57:00.711, 1, null, null). " while parsing file:///D:/Program Files/Odoo/odoo-8.0-20150603/openerp/addons/insure_demo_wkf/insure_info_view.xml:9, near

mail_channel_menu_root_chat is for odoo 9

Author

Hi Jigesh ,its not working...I tried with your latest code

Author

I tried like ................................... Not Working

Author

See this Post :- https://www.odoo.com/forum/help-1/question/hide-menu-for-existing-group-18704.