i'm using odoo 11 and i have many managers in the same department and i want that every manager see and approve the requests of his own employees only. How can i resolve this problem ? Any idea please ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
i found the solution i should create a new record rule with the domain filter ['|',('employee_id.user_id','=',user.id),('employee_id.parent_id.user_id','=',user.id)]
Hi,
we can add the manager in the employee master.Add this condition to check whether he is manager or not employee_id.parent_id.user_id.id = self._uid if this condition satisfy he can approve the request other wise raise a warning.
Hi Dhouha,
I am seeing the same question from you for the third time i guess. So I will repeat my answer one more time. You can either raise a warning when a manager tries to approve leaves of users who are not in his department. To do this you may use super on approve method in hr_holidays.
Second and better way to do what you wish is to add record rules so that managers can see leaves of his employee only. Since you need to changes rules of Leaves/Manager, delete the exiting rules for that group in hr_holidays object. Then add a new record rule "[('department_id.member_ids.user_id', '=', user.id)]" and give this as domain.
Mihran
Thanks Mihran, i repost this question because i tried all the answer but always i don't get the result that i want. I even try your answer on the model hr.holidays but it always display all the leaves request by all the employees
Hi Dhouha,
Have you disabled the other record rules for that group for the same object?
Yes , for this group there is one rule which is my rule
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Jul 24
|
939 | ||
|
1
Jun 24
|
3560 | ||
|
1
Oct 23
|
8578 | ||
|
1
Oct 23
|
97 | ||
413 Request Entity Too Large
Solved
|
|
1
Aug 23
|
2192 |
Show records on TreeView that are related to Active User Department: https://goo.gl/F42kRf