Hr Contract Employee Calendar Planning
This module ensures a consistent working times history when using the hr_contract and hr_employee_calendar_planning modules together.
There are 3 different data models which can relate to working time (resource.calendar) records:
- Employees (hr.employee)
- Contracts (hr.contract)
- Resources (resource.resource) -\> related to hr.employee through resource.mixin
The hr_employee_calendar_planning module adds the calendar_ids field to employees, which allows a more flexible working times configuration: Instead of selecting a single resource.calendar, multiple calendars can be combined into one auto-generated calendar.
However, contracts are not considered when creating auto-generated calendars. This can lead to unexpected behaviour, because the active contract calendar and the employee calendar can diverge (calendar mismatch). Additionally, when configuring a new contract, or changing the existing contract calendar, the employee calendar will be overwritten by the contract calendar.
To resolve this issue, this module migrates current and previous contract calendars into the calendar_ids and thus the auto-generated calendar. Additionally, changes to the employee calendar by contracts are prevented. The resource_calendar_id field is hidden in contract views, since all working times should be managed in the calendar_ids field for each employee. However, it is still possible to keep a meaningful contract history, e.g. for salary information.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Keeps an employee's working schedule consistent between their contract and their employee calendar plan. The contract's working hours field is hidden and automatically follows the employee's calendar.
This module links the working schedule (working hours) of a contract with the working schedule configured on the employee, so the two no longer diverge.
- On the contract form, the working hours field is hidden, and the warning about a schedule mismatch is hidden as well. The same field is hidden in the contract history form and its list column.
- When a new contract is created, its working hours are automatically set to the employee's current working schedule.
- When someone tries to change the working hours on an existing contract, the change is ignored if it differs from the employee's schedule, so the contract keeps following the employee.
- When the module is installed, existing contracts are migrated: each contract's working schedule is copied into the employee's calendar plan lines with the contract's start and end dates, and overlapping lines are adjusted. The employee's main working schedule is then aligned with the contract.
It touches hr.contract, hr.employee and the employee calendar plan lines, and is installed automatically when both Human Resources contract and employee calendar planning features are present.
Depends on
Models and fields (1)
- hr.contract · extends an existing model
Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 4 confirmed, 5 with no information of 9 versions.
Sources · Odoo 15.0
Confirmed on 2026-11-03 in branch 15.0 of OCA/hr.
terminal Installation and usage
No verified informationInstallation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.