跳至内容
菜单
此问题已终结
3 回复
2200 查看

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

形象
丢弃
最佳答案

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.

形象
丢弃
编写者 最佳答案

its working thanks 

形象
丢弃

Happy to help!

最佳答案

You can add group content filed using xml 

<xpath expr="//field[@name='content']" position="attributes">
    <attribute name="groups">base.group_no_one</attribute>
</xpath>
形象
丢弃