تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
11535 أدوات العرض

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
مايو 24
2066
1
أبريل 23
14525
9
ديسمبر 23
23820
1
مايو 20
6259
1
مايو 19
2782