Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
7438 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Penulis

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

Jawaban Terbai

Did you ever figure out a solution for this issue?

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
5
Sep 20
12780
1
Mar 15
5224
0
Mar 15
3905
6
Mei 24
70919
1
Okt 23
2078