Wednesday, June 25, 2025
1 change · saas-17.4
Miscellaneous changes
## Steps to reproduce: - Install **Timesheets** and **payroll** apps. - Create a copy of the (**Standard 40 hours/week**) working schedule but remove **Wednesday** working hours. - Create a new **employee**, and set his Working Hours to the newly created working schedule. - Create a new **_running_** **contract** for the newly created employee with the newly created working schedule. - Go to **Timesheets** app, and search for the newly created employee. - **Add a line** for a project and r
Original PR description
## Steps to reproduce: - Install **Timesheets** and **payroll** apps. - Create a copy of the (**Standard 40 hours/week**) working schedule but remove **Wednesday** working hours. - Create a new…
## Steps to reproduce: - Install **Timesheets** and **payroll** apps. - Create a copy of the (**Standard 40 hours/week**) working schedule but remove **Wednesday** working hours. - Create a new **employee**, and set his Working Hours to the newly created working schedule. - Create a new **_running_** **contract** for the newly created employee with the newly created working schedule. - Go to **Timesheets** app, and search for the newly created employee. - **Add a line** for a project and register 8 hours in each day from Monday to Saturday. - Switch the view to Day, Notice how for both Wednesday and Saturday, no overtime is shown. +08:00 should be shown for each as both are non-working days per the newly created working schedule. **(Issue 2)** ## Investigation: - The overtime text comes from https://github.com/odoo/enterprise/blob/1720b5578998b28c91c6820a63ecbd397297c47f/timesheet_grid/static/src/components/employee_overtime_indication/employee_overtime_indication.xml#L8 using `overtimeIndication()` getter https://github.com/odoo/enterprise/blob/1720b5578998b28c91c6820a63ecbd397297c47f/timesheet_grid/static/src/components/employee_overtime_indication/employee_overtime_indication.js#L34 - For the off days - (Wed, Sat, Sun) in our example -, the `allocated_hours` (`this.props.allocated_hours`) = ZERO - And so `shouldShowHours()` returns `false` https://github.com/odoo/enterprise/blob/1720b5578998b28c91c6820a63ecbd397297c47f/timesheet_grid/static/src/components/employee_overtime_indication/employee_overtime_indication.js#L19-L21 - which makes `overtimeIndication()` returns null. That's why no overtime text is shown for off-days - Note that `allocated_hours` is `undefined` for rows that represent employee hours of the current week opw-3718279 Forward-Port-Of: odoo/enterprise#65490 Forward-Port-Of: odoo/enterprise#60048