Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Leave Approval By Various Number of Managers

Mohamed Magdy
on 3/13/14, 12:18 AM 1,863 views

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

Mohammed Mansour
On 3/13/14, 5:07 AM

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:

  1. Create a separate group called group_department_manager
  2. Attach this group to the appropriate workflow transition
  3. Add all department managers to this group
  4. Modify 'ir.model.access' rules restricting access to 'hr.holidays'
  5. 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

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

3 follower(s)


Asked: 3/13/14, 12:18 AM
Seen: 1863 times
Last updated: 5/18/16, 5:25 AM