Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
3436 มุมมอง

Hi,

I've related department_id from hr_employees in some entities like analytic_account, res_partner, project_project and I'd like to filter this entities using user logged department.

Example: The user logged must access projects from his department
The user logged must access customers (partners) from his department
The user logged must access analytics accounts from his department.

I'm trying to filter using rules and groups in that entities using this:
[('department_id.member_ids.user_id','=', 'user.id')]
[('department_id','=',user.id.employee_id.department_id)]
[('department_id','=',user.context_department_id.id)]

But it's not working.

Can you help me? Any example?

Thanks


อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Vishal,

Thanks for your response.

I was thinking the same, but, any ideas how to check my user_id logged with department_id?

In many companies, it's very common separate information like partners, opportunities, projects, accounts, into differents internal departments.

Regards

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello Santiago,

You are not getting through because you can fetch a related user from the employee but not the other way round. Hope this helps.

Vishal Ratani

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ค. 25
806
Filters in multiple companies แก้ไขแล้ว
1
พ.ค. 25
1546
ADD PROPERTIES แก้ไขแล้ว
1
พ.ค. 25
1816
2
มี.ค. 25
1459
1
มี.ค. 25
1772