Timesheets from Leaves: data integrity
This module ensures data integrity between Leaves and generated Timesheets, as well as allows to restore data integrity.
auto_awesome What this module does
AI-generated from the code · Odoo 12.0Keeps leave-generated timesheets consistent with the leave they come from, and lets you rebuild them if they get out of sync. It also blocks manual edits to timesheet lines that are linked to a leave.
When a leave automatically creates timesheet entries, those entries are tied to the leave. This module protects that link and gives you a way to repair it.
- On timesheet lines (
account.analytic.line) that are attached to a leave, you can no longer change the key values (description, project, task, analytic account, quantity, user, date, employee). If you try, Odoo raises an error: "You cannot modify timesheet lines attached to a leave". This stops accidental edits that would break the link.
- A server action named "Restore data integrity with Leaves" is available on timesheet lines. It recalculates the line from the leave's configuration (project, task, analytic account, employee, user) and from the employee's working hours for that day, then updates the line accordingly.
- A server action named "Restore data integrity with Timesheets" is available on leaves. For employee leaves whose leave type has a timesheet project and task, it removes the existing linked timesheet lines and recreates them day by day, based on the employee's working time and excluding other leaves.
These actions appear as buttons/actions on the respective records. The module touches account.analytic.line and hr.leave.
Depends on
Models and fields (2)
- hr.leave · extends an existing model
- account.analytic.line · extends an existing model
Text generated by AI (DeepSeek) from reading the Odoo 12.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: 1 confirmed, 8 with no information of 9 versions.
Sources · Odoo 12.0
Confirmed on 2026-11-03 in branch 12.0 of OCA/timesheet.
terminal Installation and usage
OCA documentation · Odoo 12.0Usage
Source · Odoo 12.0To restore data integrity from Timesheets to Leaves:
- Go to Timesheets > Timesheet > All Timesheets.
- Select timesheet lines of interest and perform Action > Restore data integrity with Leaves.
To restore data integrity from Leaves to Timesheets:
- Go to Leaves > Managers > All > Leaves.
- Select leaves of interest and perform Action > Restore data integrity with Timesheets.
No verified information in OCA: Installation, Configuration.
Installation 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.