コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
11597 ビュー

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?

アバター
破棄

@yoromang not work for me?!

最善の回答

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

アバター
破棄
最善の回答

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>

アバター
破棄
最善の回答
<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>
アバター
破棄

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)

関連投稿 返信 ビュー 活動
2
5月 24
2128
1
4月 23
14598
9
12月 23
23887
1
5月 20
6342
1
5月 19
2858