I need to Approve Leaves of Employees, The number of managers/ids will vary from one employee to another Example: Many Departments in a company will use its own path to approve leaves In Dep1, Emp1_1 and Emp1_2 will create Leave Request which will be approved by Manager1 and Manager2
In Dep2, Emp2_1 and Emp2_2 will create Leave Request which will be approved by Manager1, Manager2, Manager3
The leave approval process in the hr_holidays module is a pretty basic one. An employee's leave can only be approved by a user in the HR Officer group (or higher). So, if you want to involve the employee's manager in the process you can either: 1) Give the manager HR Officer access or 2) Create your own (fairly sophisticated) module to override the default workflow
My "very rough" outline for how #2 would work:
- Create a separate group called group_department_manager
- Attach this group to the appropriate workflow transition
- Add all department managers to this group
- Modify 'ir.model.access' rules restricting access to 'hr.holidays'
- Create 'ir.rule' object for 'hr.holidays' that would allow a user to only read/write records for users that are under him in the employee hierarchy :P
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 3/13/14, 12:18 AM|
|Seen: 1991 times|
|Last updated: 5/18/16, 5:25 AM|