This question has been flagged
2 Replies
5518 Views

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!

Avatar
Discard
Best Answer

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)]

Avatar
Discard
Author

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

Best Answer

Did you ever figure out a solution for this issue?

Avatar
Discard