Friday, April 10, 2026
2 changes · saas-19.1
Code cleanup and technical improvements
This update adjusts how attendance analysis reports calculate costs, specifically incorporating hourly rates associated with each employee. This ensures more accurate tracking of labor expenses within the attendance reports, improving the reliability of time and attendance data. The change was made to align with a new employee versioning model.
Original PR description
Update the attendance analysis report initial query according to the hourly_cost change. **PR com**: https://github.com/odoo/odoo/pull/258081 task-6098429
This update allows us to accurately track an employee's hourly cost over time by moving this data from the main employee record to a versioned record. Previously, changes to hourly cost would overwrite historical data, making it impossible to see how costs evolved. This change provides a more complete and reliable record of employee expenses.
Original PR description
This commit will migrate the hourly_cost field from the base employee model to the versioned record model. **Why:** Previously, the hourly_cost field was defined directly on the hr.employee model. Because this model represents the "main" record, any changes to the hourly cost would overwrite the value across all historical versions of that employee. This made it impossible to track how an employee's cost to the company evolved over time. By moving this field to the versioning model each historical snapshot of the employee can now maintain its own specific hourly cost. **What:** - Added the `hourly_cost` field to the employee versioning model. - Updated `hourly_cost` of an employee to use the version related field task-6098429