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

I have an requirement that when i install a module the groups which i have created should be equal to True how can i achieve this?

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

@yoromang not work for me?!

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

Make it part of a group which is installed by default might be a handy solution.

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

Check below example here group Edit Product Sale Price is true for all base users 

<record id="group_edit_product_sale_price" model="res.groups">
    <field name="name">Edit Product Sale Price</field>
    <field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất
<record id="base.default_user" model="res.users">
<field name="groups_id" eval="[(4,ref('base.group_user')),(4,ref('your_module.your_group'))]"/>

</record>
Ảnh đại diện
Huỷ bỏ

You might have to re-install your module for the changes to take effect

@syrine it should work, try to re-install if possible
You can also do it manually. set the group on the default user ( settings -> users & companies -> users (filter: inactive users) .

each new user copies its default values from the (default user template)

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 5 24
2112
1
thg 4 23
14570
9
thg 12 23
23858
1
thg 5 20
6319
1
thg 5 19
2819