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

Such as employee A belong the department A, employee B belong the department B.
The employee A can not see any information of B, such as "Time Off", "Employee", "Calendar",because of different department.

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

You should be able to use Record Rules.  

If you look in the demo database you should see one example with this domain:

['|',
'|', ('employee_id.user_id', '=', user.id), ('employee_id.parent_id.user_id', '=', user.id),
'|', '|', ('department_id', '=', False), ('department_id.member_ids.user_id', 'in', [user.id]), ('department_id.manager_id.user_id', '=', user.id)]


There's another example in this question.

الصورة الرمزية
إهمال
الكاتب

Try to add one customize rules in 'Settings-Technical-Record Rules',but the user(not administrator) still can see all the employee in 'Employee' App

Name:Customize

Object:Basic Employee

Active:yes

Rule Definition (Domain Filter):

['|',

'|', ('employee_id.user_id', '=', user.id), ('employee_id.parent_id.user_id', '=', user.id),

'|', '|', ('department_id', '=', False), ('department_id.member_ids.user_id', 'in', [user.id]), ('department_id.manager_id.user_id', '=', user.id)]

Access Rights:read

Group:global

Sorry, I'm not an expert on the database structure for the Employee app, I was just offering some advice about Record Rules.

الكاتب

Thank you all the same

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أغسطس 25
3631
1
أكتوبر 24
3186
2
يوليو 24
2207
0
مايو 23
2408
9
ديسمبر 23
33453