Daily updates from Odoo
Sunday, January 26, 2025
3 changes · master
Miscellaneous changes
Partial revert of https://github.com/odoo/enterprise/pull/67111. Some users rely on the structure of the export format (column order). The order is most frequently code, then name. And code is a required field. Those reasons made us want to re-adapt the behavior. We also want the amounts to be formatted with thousands separator and to always have 2 decimals (even if .00) task-4399107 Forward-Port-Of: odoo/enterprise#77825 Forward-Port-Of: odoo/enterprise#75740
Original PR description
Partial revert of https://github.com/odoo/enterprise/pull/67111. Some users rely on the structure of the export format (column order). The order is most frequently code, then name. And code is a required field. Those reasons made us want to re-adapt the behavior. We also want the amounts to be formatted with thousands separator and to always have 2 decimals (even if .00) task-4399107 Forward-Port-Of: odoo/enterprise#77825 Forward-Port-Of: odoo/enterprise#75740
Since this commit:https://github.com/odoo/enterprise/commit/7bfeb39f64bfecde2960c6f6678062ac515589cb it wasn't possible to export in xml a batch payment. no-task-id Forward-Port-Of: odoo/enterprise#77758
Original PR description
Since this commit:https://github.com/odoo/enterprise/commit/7bfeb39f64bfecde2960c6f6678062ac515589cb it wasn't possible to export in xml a batch payment. no-task-id Forward-Port-Of: odoo/enterprise#77758
#### Issue: - When an employee is assigned a resource calendar with the `flexible_hours` option enabled, the daily/weekly overtime on the timesheet calendar is not calculated based on the 'Average Hour per Day' that we set for the flexible resource, it is instead being calculated based on the specific work intervals. #### Steps to reproduce: 1. Assign a resource calendar with `flexible_hours` enabled to an employee. 2. Ensure the calendar has a defined `hours_per_day` value. 3. Verify
Original PR description
#### Issue: - When an employee is assigned a resource calendar with the `flexible_hours` option enabled, the daily/weekly overtime on the timesheet calendar is not calculated based on the 'Average…
#### Issue: - When an employee is assigned a resource calendar with the `flexible_hours` option enabled, the daily/weekly overtime on the timesheet calendar is not calculated based on the 'Average Hour per Day' that we set for the flexible resource, it is instead being calculated based on the specific work intervals. #### Steps to reproduce: 1. Assign a resource calendar with `flexible_hours` enabled to an employee. 2. Ensure the calendar has a defined `hours_per_day` value. 3. Verify that the timesheet grid correctly shows the daily/weekly overtime hours as per `hours_per_day`. 4. Test with non-flexible schedules to confirm existing behavior remains unchanged. #### Solution: - In the frontend, the method `fetchDailyWorkingHours` retrieves daily working hours data by calling the backend method `get_daily_working_hours`. - This method computes working hours based on the employee's `resource_calendar_id` and its associated work intervals. However, It does not check if the `flexible_hours` flag is enabled on the `resource_calendar_id`. For employees with flexible schedules, the backend still calculates working hours based on detailed intervals instead of simply using the `hours_per_day` value defined in the `resource_calendar`. - To fix this I ensure we respect flexible schedules by using `hours_per_day` directly when `flexible_hours` is enabled. opw-4407910 Forward-Port-Of: odoo/enterprise#77315