Hello, I want to restrict access to certain records in Odoo based on the logged-in user’s group. How can I implement record rules? (using python)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
1
الرد
307
أدوات العرض
Hello,
Here is an example :
def _filter_access(self):
if self.env.user.has_group('module.group'):
return [('user_id', '=', self.env.uid)]
return []
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيل