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

In my case I have to set all the companies in allowed companies that allow the user to see the e-commerce categories in my e-commerce site.
Is there any way that if user is created than we can add all the companies by default in his allowed companies?
I am using odoo 11.

الصورة الرمزية
إهمال
أفضل إجابة

You need to write default_get for allowed companies. In default_get you can set all active companies on new user creation.


default=lambda self: self.env['res.company'].search([]).ids
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أغسطس 25
3357
1
يوليو 25
1520
1
أغسطس 25
1152
0
مايو 25
1869
2
مايو 25
2343