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

by default two groups is showed odoo I want to add an third extra group 

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

Hi, 

In your security file in your module you can create another group as below,

<record id="group_your_group_name" model="res.groups">

    <field name="name">Custom Group</field>

    <field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>

</record>

And then you can add this group to your user role in Roles.

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

its working thanks 

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

Happy to help!

Câu trả lời hay nhất

You can add group content filed using xml 

<xpath expr="//field[@name='content']" position="attributes">
    <attribute name="groups">base.group_no_one</attribute>
</xpath>
Ảnh đại diện
Huỷ bỏ