跳至內容
選單
此問題已被標幟
2974 瀏覽次數

Hello,


I need to provide a Manager of the Parent department with access to a record of the child's department. 

I created a domain: ['|', '|', '|', '|',
('x_studio_department.manager_id.user_id', '=', user.id),
('x_studio_department.parent_id.manager_id.user_id', '=', user.id), ('x_studio_department.parent_id.parent_id.manager_id.user_id', '=', user.id),
('x_studio_department.parent_id.parent_id.parent_id.manager_id.user_id', '=', user.id),
('x_studio_department.parent_id.parent_id.parent_id.parent_id.manager_id.user_id', '=', user.id)]
but would like to minimize it's length and complexity.

Could you please advise how to rewrite it to avoid multiple 'parent' levels, and to provide access to all Managers of higher levels??

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
1月 24
3285
0
1月 24
1573
0
12月 20
2130
1
9月 19
4917
0
6月 17
3169