Tuesday, September 23, 2025
2 changes · saas-17.4
Resolved issues and error corrections
Uploading certain electronic invoice XML files could fail when the file contained a zero or invalid basis quantity. The import now uses a safe default so customers can generate invoices from these files without encountering an error.
Original PR description
Currently, an error occurs when uploading an XML file to generate an invoice. Step to produce: - Install the `account_edi_ubl_cii` module. - Go to Invoicing / Customers / Invoices, And upload this…
Currently, an error occurs when uploading an XML file to generate an invoice. Step to produce: - Install the `account_edi_ubl_cii` module. - Go to Invoicing / Customers / Invoices, And upload this [1] XML file to generate an invoice. Link[1]: https://drive.google.com/file/d/1t_0XxkX7X3elgqpff4REl6LRjzOv2CFQ/view?usp=drive_link `ZeroDivisionError: float division by zero` The issue arises because the '_find_value()' method returns a string value, such as '0'. This value is converted to a float and assigned to the 'basis_qty' variable then the system tries to divide a float number with 'basis_qty'(zero) at [2]. Link [2]: https://github.com/odoo/odoo/blob/4f9e06a701224ef18819391ddd57e56830af52f9/addons/account_edi_ubl_cii/models/account_edi_common.py#L558 To resolve this, assign a default value of 1.0 to the 'basis_qty' variable when '_find_value()' returns a '0' or any other invalid value. Sentry-6180097960 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Planning now blocks shift templates that span an excessive number of days before they can be used. This prevents employees from encountering an error when creating shifts from templates and gives users clearer feedback instead.
Original PR description
Currently, An error occurs when the employee adds a working 'Shift' in the resource calendar using a planning template that has too many span days. Step to produce: - Install the `planning` module. - Go to Planning / Configuration / Shift Templates, and Create a template that span day is more than 1000. - Create a 'Shift' in 'My Planning', Add an administrator as 'Resource,' and click on the 'Shift Templates'. `AttributeError: 'bool' object has no attribute 'replace'` The issue occurs because the system attempts to replace an hour and minute with end time at [1], But end time is False(boolean) as the 'plan_days' method returns a False value due to the excessive span days in the template. Link [1]: https://github.com/odoo/enterprise/blob/fd94c8bbe8f75540681f3b85ebf8d9767cf30f2a/planning/models/planning.py#L636 To resolve this, raise a validation error if the user tries to create a shift template with an excessive span days. Sentry-6190026432