Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6001 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Tác giả

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.

Tác giả

Thank you all the same

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 25
3632
1
thg 10 24
3256
2
thg 7 24
2209
0
thg 5 23
2411
9
thg 12 23
33453