Daily updates from Odoo
Saturday, May 11, 2024
3 changes
Resolved issues and error corrections
This update fixes two bugs in the Planning module that occur when users create or modify planning slots with templates. The first issue caused an error when removing the end date, and the second caused problems when the start date was empty. These fixes make the planning slot creation process more reliable and prevent unexpected errors.
Original PR description
This traceback occurs when the user makes the `end date` as empty while creating a new planning slot with template. To reproduce this issue: 1) Install planning 2) Create a new `planning slot` 3)…
This traceback occurs when the user makes the `end date` as empty while creating a new planning slot with template. To reproduce this issue: 1) Install planning 2) Create a new `planning slot` 3) click on any `template id` 4) Now remove the `end date` 5) A traceback occurs Error:- ``` TypeError: unsupported operand type(s) for -: 'bool' and 'datetime.datetime' ``` When the user removes the `end datetime` its value is `False` which leads to the above traceback when `-` is used between `start` and `end` datetime. https://github.com/odoo/enterprise/blob/5600b5b754f79e5d7a253fe9db45ac8a9273d3de/planning/models/planning.py#L406-L408 Additionally, a `value error` is also occurring when the `start` date-time is empty, while calculating start-end-dates with `template` . As it returns both `datetime` and timezone. From the below lines `tzinfo` only removes when the start date time and template is present. https://github.com/odoo/enterprise/blob/5600b5b754f79e5d7a253fe9db45ac8a9273d3de/planning/models/planning.py#L621-L627 After applying this commit will resolve both issues and make the code more robust sentry-5005245970 Forward-Port-Of: odoo/enterprise#61024
This fix enables HSBC bank customers to generate BACS Direct Debit payment files without requiring a SUN (Service User Number). Users can now enter 'HSBC' as their SUN value in settings, and the system will handle the file generation correctly by leaving SUN fields blank and using a default identifier (999999) where needed. This resolves a compatibility issue specific to HSBC's requirements while keeping the SUN field mandatory for other banks.
Original PR description
The SUN number is normally mandatory to generate such a file, and is repeated at multiple places within it. However, HSBC bank diverges from the others, and allows putting 'HSBC' at a normally unused…
The SUN number is normally mandatory to generate such a file, and is repeated at multiple places within it. However, HSBC bank diverges from the others, and allows putting 'HSBC' at a normally unused position of the file; in such case, all the fields supposed to contain the SUN can be left blank. UHL1 records of the file also use the SUN to build an identifier. HSBC's doc is unclear about what should go there, but ING says here https://www.ingwb.com/binaries/content/assets/support-content/payments-and-reporting/insidebusiness-payments/domestic-uk-file-format-description-february-2024.pdf that this identifier should be 999999 + 4 blanks or SUN + 4 blanks, so we make the choice to use 999999 if we have no SUN, for HSBC. We don't want to make the SUN field optional for everyone just because of that one use case. Instead, we ask people to write 'HSBC' as their SUN number in the settings if they don't have any, and this considers the field as blank for the file generation. (HSBC's doc can be found on the related ticket) opw-3863262 Forward-Port-Of: odoo/enterprise#62224 Forward-Port-Of: odoo/enterprise#62111
This update fixes a critical bug in the multicurrency report feature where users could enter zero as a currency exchange rate, causing the system to crash with a division by zero error. The fix prevents users from entering invalid zero values in the currency rate filter, ensuring reports generate correctly.
Original PR description
In the mutlicurrency report, there is a filter that allow to change the currency rate dynamically, and we authorize the input to be 0 which will cause a division by zero error. task-3869928 Forward-Port-Of: odoo/enterprise#62036 Forward-Port-Of: odoo/enterprise#60760