How to Generate Timesheets for Public Holidays and Time Off in Odoo 18: Complete Guide
By Braincuber Team
Published on February 26, 2026
Odoo 18 automates timesheet entries for approved leave and public holidays so your employees never have to manually log time-off hours again. Once a time-off request is validated, the system generates the corresponding timesheet record automatically. That means accurate project cost tracking, complete timesheet records, and payroll that actually matches reality.
What You'll Learn:
- Configuring public holidays to auto-generate timesheet entries
- Restricting leave requests on mandatory work days
- Enabling Time Off integration in Timesheet settings
- Setting up time off types with approval rules
- Automatic timesheet allocation after validation
- Using the "Public Holiday Included" option on leave types
- Managing leave schedules with the Calendar View
Prerequisites: Required Modules
Before configuring any of this, make sure you have both the Timesheets (hr_timesheet) and Time Off (hr_holidays) modules installed. Without both modules active, the integration between leave records and timesheets will not work.
1. Timesheet for Public Holidays
When a public holiday is part of an employee's working schedule and marked as paid, Odoo 18 automatically creates a corresponding timesheet entry. No manual data entry needed. This ensures accurate project accounting and payroll reflection for non-working paid days.
Configuring Public Holidays
Navigate to Public Holidays
Open the Time Off module, go to Configuration, and click Public Holidays.
Create or Update a Public Holiday
Add a new public holiday record. Associate it with the appropriate Company and Work Schedule.
Verify Auto-Generated Timesheet
If the employee's working schedule includes this paid public holiday, a timesheet entry is automatically generated under Timesheet > My Timesheet.
Public Holiday + Work Schedule
The automatic timesheet entry for public holidays only works if the holiday falls on a day included in the employee's configured Work Schedule. If the employee doesn't work that day anyway, no timesheet entry is generated.
Restricting Leave Requests on Mandatory Work Days
Odoo 18 lets you prevent employees from requesting time off on specific mandatory working days. Think end-of-month closings, inventory count days, or critical audit periods.
Open Mandatory Days
Navigate to Time Off > Configuration > Mandatory Days.
Add a New Mandatory Day
Click Create and specify the date and reason for the restriction (e.g., "Year-End Inventory Count").
Restriction Active
Once configured, employees cannot request leave on these dates. The system blocks the request automatically.
2. Timesheet for Validated Time Off
This is where the real automation kicks in. When an employee's time-off request is validated, Odoo 18 can automatically generate timesheet entries for the leave duration. No more chasing people to log their sick days manually.
Enable Time Off in Timesheet Settings
Open Timesheet Settings
Navigate to Timesheets > Configuration > Settings.
Enable "Time Off" Under Project Time Tracking
Under the Project Time Tracking section, enable the Time Off option. This tells Odoo to connect time-off records with timesheet entries.
Configure the Project and Task
You must also configure the corresponding Project or Task that will receive timesheet entries for validated time-off requests and public holidays.
Configure Time Off Types
The Time Off Types dashboard shows all existing types with their Display Name and Approval configuration. Use Filter, Group By, and Favorites tools to sort the list. Click New to create a new type.
Approval Rules
When creating or editing a time off type, use the Approval field to define how requests get validated. The approval rule directly affects when timesheet entries are generated.
| Approval Type | How It Works | Timesheet Generated |
|---|---|---|
| No Validation | Auto-approved, no manual validation | Immediately on save |
| By Employee's Approver | Requires approval from assigned approver | After approver validates |
| By Time Off Officer | Requires designated officer approval | After officer validates |
| By Approver and Officer | Requires both parties to approve | After both validate |
Submitting a Time Off Request
Open Time Off Request Form
Navigate to the Time Off module, click My Time Off, then press the New button.
Fill Out the Request
Select the Time Off Type (e.g., Personal Leave, Vacation, Sick Time). Choose your Start and End Dates. The Duration field auto-calculates. Add a Description with the reason for leave.
Submit for Approval
Click Save to submit the request. The dashboard calendar also allows you to view and manage requests directly from the calendar interface.
Automatic Timesheet Allocation
Once the Time Off request is submitted and validated based on its approval settings, the system automatically allocates the time to the Timesheets module under the specified Project and Task (if configured). Here's how it works depending on the approval type:
IF Time Off Type = "No Validation"
Timesheet entry created IMMEDIATELY on save
IF Approval Required (any type)
Timesheet entry created AFTER manager/officer validates
Time Off Types with "Public Holiday Included"
Odoo 18 adds a new "Public Holiday Included" checkbox inside the time off type settings. This single checkbox changes how leave duration is calculated when a public holiday falls within the leave period.
Enabled: Holidays Counted
When enabled, public holidays falling within the leave period are counted as part of the leave duration. Use for types like Paid Leave where holidays are included in the deduction.
Disabled: Holidays Excluded
When disabled, public holidays are excluded from the leave count. Use for types like Unpaid Leave where only actual working days should be deducted.
Leave Period = Monday to Friday (5 days)
Public Holiday = Wednesday
Public Holiday Included = ON -> 5 days deducted
Public Holiday Included = OFF -> 4 days deducted
Time Off Request Fields Reference
| Field | Description |
|---|---|
| Time Off Type | Category of leave (Personal Leave, Vacation, Sick Time, etc.) |
| Dates | Start and end dates; Duration auto-calculates |
| Duration | Auto-calculated based on selected dates and work schedule |
| Description | Reason or notes for the leave request |
| Approval | Validation rule set on the Time Off Type |
| Public Holiday Included | Whether public holidays count toward leave duration |
Calendar View for Leave Management
The Calendar View in the Time Off module provides a visual, centralized interface for HR managers and employees to manage leave schedules. It's color-coded by leave type and supports daily, weekly, and monthly views.
Multiple Time Frames
Switch between Daily, Weekly, and Monthly views to get the desired level of detail for leave planning.
Color Coding by Type
Each leave category (Sick Leave, Vacation, Public Holiday) appears in a different color for instant visual differentiation.
Filter and Group Options
Use filters like Department, Employee, or Time Off Type to narrow the view and identify scheduling overlaps.
Clickable Entries
Click any time off entry for quick access to its details or editing (with proper permissions). Manage everything from one place.
Timesheet + Time Off Sync
This integration ensures that employee absences are accurately reflected in both attendance and project time tracking. If the timesheet entries aren't appearing after validation, double-check that the Time Off toggle is enabled in Timesheet Settings and that a Project/Task is configured for the leave type.
Need Help Configuring Odoo 18 Timesheets & Time Off?
Our experts can help you set up automatic timesheet generation for public holidays and validated time off, configure approval workflows, and ensure your HR and project tracking modules work together without missing a single hour.
