| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Time Off (hr_holidays)
• Website (website) • Calendar (calendar) • Employees (hr) • Discuss (mail) |
| Lines of code | 135 |
| Technical Name |
employee_leave_web |
| License | OPL-1 |
| Versions | 16.0 17.0 18.0 |
Employee Leave Application via Website
A simple web form for submitting time-off requests
This module provides a clean and accessible website page for employees to submit leave (time off) applications. The form supports full-day and half-day leave, morning/evening session selection, and optional file attachments.
- Works with Odoo's Time Off (hr_holidays) module
- Public-facing web form accessible via
your-website/leave/apply - Matches employee by Employment Number
- Automatically creates a leave request in the backend
- Includes optional file upload (e.g., medical certificate)
Preconfiguration steps
- Go to Employees module and select an employee
- Go to the HR Settings Tab. In 18, it's called Payroll
- Set the registration number of the employee
How It Works
- User visits
your-website/leave/applyon the website - Fills in the form with Employment Number, dates, leave type, and reason
- Optional: Checks "Half Day" and selects Morning or Evening
- Optional: Attaches a file
- Submits the form
- A leave request is created in Odoo under the employee's record
- The leave request is automatically created in the Time Off module upon submission.
- HR managers can view, review, and approve the request from the backend.
- Employees do not have access to the backend, so they cannot see other requests or sensitive data.
- The web form is user-friendly and does not require portal or internal access.
- The form is accessible via a public URL from any device with internet access.
- This keeps the process simple and efficient for both employees and HR staff.
Employee Leave Web Form
This module provides a simple and user-friendly web interface for employees to apply for leave (time off) directly from the website.
Features
- Publicly accessible leave application form.
- Employee ID-based authentication (via identification number).
- Selection of leave type and date range.
- Option for half-day leave with Morning/Evening selection.
- Optional file attachment (e.g., medical certificate).
- Automatic creation of a hr.leave record in Odoo.
- Website menu integration (/leave/apply).
Installation
- Clone or copy the module to your Odoo addons directory.
- Restart the Odoo server.
- Install the module from the Apps menu.
Usage
- Visit the website route: /leave/apply
- Fill out the form fields:
- Employee Number
- Leave Type
- Start Date
- End Date (hidden for half-day)
- Half-Day checkbox and session (morning/evening)
- Optional reason and file attachment
- Submit the form.
- The leave request is created in the backend under Time Off > Management > Time Off.
Configuration
- Ensure that employee records have the Identification ID filled in (used as a login key).
- Ensure that appropriate Leave Types (hr.leave.type) exist.
Technical Details
Model Used: - hr.leave
Custom Website Route: - /leave/apply – Displays the form - /leave/submit – Handles form submission
Controller File: - controllers/main.py
Template File: - views/leave_web_templates.xml
Menu Integration: - Adds a website menu entry under the main site pointing to /leave/apply.
License
OPL-3
Maintainer
- James Oginga
- techpointinnovations@gmail.com
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module