Saturday, September 21, 2024
2 changes
Enhancements to existing features
The Barcode app now handles RFID and bulk barcode scans more smoothly, including support for Zebra Android readers and clearer progress while many items are processed. Inventory adjustments are more reliable by prompting users about missing serial-numbered items and using expected quantities for existing lots, reducing counting mistakes and repeated alerts.
Original PR description
List of changes: - Can split RFID when multiples are received as one; - Avoid to display the same notification when multiple barcodes are scanned at once and some of them triggers the same notification; - Inventory Adjustment: - When not all serial numbers are counted, ask what to do with remaining ones; - When existing lots are scanned, use the theoretical quantity instead of the scanned one (if there is any.) See commits for more details. Community PR: odoo/odoo#177738 [task-4089638](https://www.odoo.com/odoo/project.task/4089638)
Employees can now use flexible or fully flexible working calendars, including schedules without fixed daily or weekly limits. This improves payroll, planning, and attendance views for teams with non-standard working patterns while preventing auto-planning from assigning flexible staff incorrectly.
Original PR description
### Description of the issue/feature this PR addresses: ------- In this commit, the flexible working hours (flexible contract) has been reworked in the resource calendar and the contract. 1.…
### Description of the issue/feature this PR addresses: ------- In this commit, the flexible working hours (flexible contract) has been reworked in the resource calendar and the contract. 1. Definition of Flexible working calendars: Flexible working calendars are defined by setting the `flexible_hours` field to True in resource calendar. Flexible resource are able to set the number of working hours per day freely, without referring to working intervals (attendance). Added a helper function `is_flexible` in resource for readability and better maintenance of this definition. 2. Introduction of Fully Flexible working calendars Fully Flexible working calendars are defined by not setting any value to the field working calendar in the resource/contract view. This type of flexible calendar has no limit to the working hours per day, as well as on the week. This allows to have fully freedom on the length of shifts for resources. Note that for contracts, fully flexible can be selected only if the contract's working entry source is not 'working schedule'. A helper function `is_fully_flexible` is added in resource for readability and better maintenance of this definition. To allow these changes, we also introduced changes in the following modules: **hr_payroll:** - `resource_calendar_id` field no longer required for hr_contract. - in demo data, added `resource_calendar_flex_40h` for flexible contract with a limit of 40hours/week. - update existing flexible contracts in demo data. (previously, flex contract had their `calendar_id`=False) **planning:** - demo employee added with fully flexible working calendar (Suman Oza) - Adapted numerous methods for calculation of slots duration: whenever the calendar attendance is referred to calculate availability, we set an exception for flexible resources. - Auto plan: adapted to **exclude** flexible resources for this feature. - `_copy_slots` method is re-adapted for missing calendar of fully flexible resources. - progress bar adapted for fully flexible resources: the total working hours of the resource (in the planning view's interval) will be displayed. - progress bar adapted for flexible resources: the progress bar will be displayed as before in the gantt view. However the denominator will be an approximation in the case of month/year interval, since we cannot know how many working days there are per week. - Added tests for flex and fully flex contracts. **planning_contract**: - a slot outside the interval of an ongoing contract period returns 0 allocated hours for flexible and fully flexible contracts. **hr_attendance_gantt:** - when retrieving unavailable_intervals_by_calendar for fully flex we return an empty Interval to set no unavailability. **hr_work_entry_contract_attendance:** - for fully flexible resources, refer to the timezone of the resource instead of the calendar. Additionally, a demo user with a fully flexible schedule has been added to display the features and facilitate future testing. Task-3762895 related PR community: https://github.com/odoo/odoo/pull/157577 update: https://github.com/odoo/upgrade/pull/5851