Skip to Content
Menu

HR Leave Employee Manager

by
Odoo
v 14.0 Third Party
Download for v 14.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Time Off (hr_holidays)
Calendar (calendar)
Employees (hr)
Discuss (mail)
Lines of code 43
Technical Name hr_leave_employee_manager
LicenseLGPL-3
Websitehttps://github.com/avanzosc/hr-addons
You bought this module and need support? Click here!

HR Leave Employee Manager

Overview

The HR Leave Employee Manager module enhances the leave request process in Odoo by modifying the domain applied to the employee_id field. With this module, the field only shows:

  • The current employee (if the user is linked to an employee record).
  • Employees managed by the current employee (employees for whom the current employee is the leave_manager_id).

This ensures that managers can only create leave requests for their own team, improving usability and enforcing better data control.

Features

  • The employee_id field on leave requests (model hr.leave) is restricted to:

    • The current user’s employee record.
    • Employees for whom the current user is the leave_manager_id.
  • Form view inheritance to ensure the employee_id field is always visible and applies the correct domain dynamically.

Usage

  1. Install the Module:

    • Install the HR Leave Employee Manager module from the Apps menu.
  2. Go to Leave Requests:

    • Navigate to Time Off > Managers > Time Off.

    • Create a new leave request.

    • In the Employee field, you will only see:

      • Yourself (if you are an employee).
      • Employees who have you set as their Leave Manager.
  3. Simplified Selection:
    • Managers will only see their team members, simplifying the creation of requests on behalf of employees.

Configuration

No additional configuration is required to use this module.

Testing

  1. Link a user to an employee record.

  2. Set that employee as the leave_manager_id of some other employees.

  3. Log in with that user and try to create a leave request.

  4. Verify that the employee_id field only shows:

    • The current employee.
    • The employees managed by that employee.

Bug Tracker

If you encounter any issues, please report them on the GitHub repository at GitHub Issues.

Credits

Contributors

For specific questions or support, please contact the contributors.

License

This project is licensed under the LGPL-3 License. For more details, refer to the LICENSE file or visit <https://opensource.org/licenses/LGPL-3.0>.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.