Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5073 Lượt xem

I tried to hide a menu using groups but it didn't work.Please see below and advise.

<menuitem id="account.menu_account_config" name="Accounting" parent="base.menu_config" groups="module1.group_hidden"/>

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Also try to call your .csv in your module and make sure you have populate it. Hope it help.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

You have overriden the standard menu, and trying to set the group attributes.. which will just append the groups to it, as it is Many2many field,.. So use (6,0) which will replace the groups

Here your code should go like this....

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

 

Refer Docs: ORM Methods

 

Ảnh đại diện
Huỷ bỏ