Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
7111 มุมมอง

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>
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi, BKF AEK

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

I hope this will help you.

อวตาร
ละทิ้ง
ผู้เขียน

Hi Hardik,

Where should I put that condition ?

hi, BKF AEK

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

ผู้เขียน

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.

ผู้เขียน

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 ตอบกลับ มุมมอง กิจกรรม
Issue with new security groups แก้ไขแล้ว
3
เม.ย. 17
4604
0
ก.พ. 21
3746
0
ก.พ. 18
2899
3
มิ.ย. 17
5829
0
ม.ค. 16
3784