跳至内容
菜单
此问题已终结
2 回复
7529 查看

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!

形象
丢弃
最佳答案

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

形象
丢弃
编写者

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

最佳答案

Did you ever figure out a solution for this issue?

形象
丢弃
相关帖文 回复 查看 活动
5
9月 20
12831
1
3月 15
5306
0
3月 15
3982
6
5月 24
71005
1
10月 23
2135