Monday, April 21, 2025
3 changes · saas-18.1
Resolved issues and error corrections
Creating new maintenance equipment could fail when GS1 barcode rules were enabled and no barcode value was present. This fix safely handles missing or invalid barcode values, allowing users to create equipment records without interruption.
Original PR description
The error is caused when the the barcode is `False` in the function `parse_barcode` when creating a new maintenance equipment after changing default barcode nomenclature to `GS1 nomenclature`. `map_gs1_barcode` proceeds to throw same error when error handling is only done for `parse_barcode` hence we need to handle it as well. **Steps to reproduce:** * Install Maintenance and Inventory * Inventory>Configuration>Settings>Barcode Nomenclature * Set to `Default GS1 Nomenclature` * Maintenance App>Equipment>New `TypeError: expected string or bytes-like object` **Solution:** * Check if barcode is a string before proceeding in `parse_barcode` function for regex. * Wrap `re.match` in try and except if it throws an type error set `match = None` and proceed as usual for `map_gs1_barcode` such that it does not throw error the same regex error. Sentry-6552593535 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Change VAT in invoice report if the invoice is set as cfdi to public to use a generic vat for both national and international clients to have more coherence with the xml that is generated for the invoice. task-4588311 Forward-Port-Of: odoo/enterprise#81842 Forward-Port-Of: odoo/enterprise#79775
Original PR description
Change VAT in invoice report if the invoice is set as cfdi to public to use a generic vat for both national and international clients to have more coherence with the xml that is generated for the invoice. task-4588311 Forward-Port-Of: odoo/enterprise#81842 Forward-Port-Of: odoo/enterprise#79775
Currently, a traceback is occurring when trying to approve a leave having the same time off with the refused state of another leave. <b>To reproduce this issue:</b> 1) Install planning_holidays without demo 2) Enable flexible hours for the working schedules of an employee 3) Create two time-offs for an employee with the same date and time 4) Refuse the first one and try to approve the second one <b>Issue:-</b> ``` ValueError: Expected singleton: hr.leave(5, 6) ``` When ther
Original PR description
Currently, a traceback is occurring when trying to approve a leave having the same time off with the refused state of another leave. <b>To reproduce this issue:</b> 1) Install planning_holidays…
Currently, a traceback is occurring when trying to approve a leave having the same time off with the refused state of another leave. <b>To reproduce this issue:</b> 1) Install planning_holidays without demo 2) Enable flexible hours for the working schedules of an employee 3) Create two time-offs for an employee with the same date and time 4) Refuse the first one and try to approve the second one <b>Issue:-</b> ``` ValueError: Expected singleton: hr.leave(5, 6) ``` When there are more than one leave record with different states, leave_date will search the record based on the employee, date and time only. https://github.com/odoo/enterprise/blob/747482f34ca8210d89d81b3363ec5a8fc3a4ff6f/planning_holidays/models/resource_calendar.py#L16-L24 So indeed we get multiple records, and this leads to the above traceback when accessing values from the leave_data. <b>Solution:-</b> Make the domain of leave_data more robust by including the state containing no refused leaves. opw-4712858,4700495 Forward-Port-Of: odoo/enterprise#83354