Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
7463 Widoki

This is somewhat the project.task hierachy:

"TASK 1" -child_ids----parent_ids-"TASK 2"-child_ids----parent_ids-"TASK 3"-message_follower_ids

The filter domain should allow follower of TASK 3 to read TASK 2 and TASK 1:

(1) - followers can read following tasks (2) - followers can read parents/grand parents of followed tasks

This filter allows (1):

[('message_follower_ids','in',[user.partner_id.id])]

How can I allow (2)?

Thanks!

Awatar
Odrzuć
Najlepsza odpowiedź

We are using a similar rule to allow supervisors to access the records of employees supervised and monitored records for their supervised and has the following syntax

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

Estamos usando una regla similar para que los supervisores puedan acceder a los registros de los empleados supervisados y a los registros de los supervisados por sus supervisados y tiene la siguiente sintaxis

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

Awatar
Odrzuć
Autor

Thank you Pablo, but the problem is this is not recursive, it doesn't escalate to N levels of parenting.

Same problem here....Want a solution which is recursive.....any help will be appreciated...Thanks

Najlepsza odpowiedź

Did you ever figure out a solution for this issue?

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
5
wrz 20
12794
1
mar 15
5267
0
mar 15
3944
6
maj 24
70946
1
paź 23
2107