Tuesday, December 26, 2023
5 changes · 17.0
Resolved issues and error corrections
This fix hides the image animation option when a website editor image comes from an external or redirected URL that may be blocked by browser protections. It prevents crashes while editing pages and also cleans up related animation settings more reliably.
Original PR description
Before this commit, the "animation" option would be shown for image of type url-attachment-redirect. From there, selection the option would result in a crash if the image was CORS protected (which is often the case). Step to reproduce: - Drag & drop "Text - Image" snippet - Double click on an image to replace it - Select in the media dialog "Add URL" and insert a CORS protected image URL - The image is correctly added, and its url is something like `/web/image/123-redirect/xxx.jpg` - Click on the image and then click on its "Animation" option -> It crashes Same flow is possible with absolute URL of a CORS protected image. Technical note: JS `fetch()` takes advantage of the browser cache, no need to create a `Map` cache for it, despite the `_computeVisibility()` method being called multiple times.
This update improves how payment errors are handled during the checkout process on your online store. Previously, payment validation could proceed even when errors occurred. Now, the system properly blocks payment processing if any errors are detected, ensuring customers cannot complete orders with invalid payment information. This prevents failed transactions and improves the checkout experience.
Original PR description
The goal is to block payment validation if a payment error have been raised. See community PR: https://github.com/odoo/odoo/pull/142401 opw-3582207 Forward-Port-Of: odoo/enterprise#52199 Forward-Port-Of: odoo/enterprise#51216
A test in the timesheet grid module was causing system crashes due to infinite recursion when checking overtime display. The fix improves the test method to properly wait for elements to appear rather than interfering with system timing functions, making the test more reliable and stable.
Original PR description
Since [1], the "Check that individual and total overtime is properly displayed" test patches the `setTimeout` function. This sometimes leads to infinite recursion when the `multi_tab` service has enough time to initialize: this service make use of `setTimeout` to call the `heartbeat` method repeatedly. Moreover, patching the `setTimeout` method is not a good idea since it makes this method synchronous which totally changes the flow that is tested. This PR fixes this issue by using the `contains` helper instead: this method will wait for the element to be inserted in the DOM and perform the assertion afterwards. fixes runbot-24889 [1]: https://github.com/odoo/enterprise/pull/46991 Forward-Port-Of: odoo/enterprise#53205
This update corrects how user access permissions are configured in the HR Referral module. The system was incorrectly assigning user access using the wrong permission group, which caused inconsistencies in who could view and interact with referral information. This fix ensures the correct permission groups are applied, restoring proper access control and view visibility across the system.
Original PR description
Using the group id to add a user instead of the one added in implied_ids. This causes consistency problems in access and rendering of views. Forward-Port-Of: odoo/enterprise#53182
This fix ensures that the security time warning message appears correctly when customers try to rent products online, regardless of how the rental duration is configured. Previously, the warning would not display if the rental was set up with daily or other non-hourly options. The fix simplifies the validation logic to properly check security time requirements in all rental scenarios.
Original PR description
[FIX] website_sale_stock_renting : Security time warning Steps to reproduce: 1- Install Website, Rentals, Sales and Inventory modules 2- Set a security time in one of the rentals 3- Go to Rental…
[FIX] website_sale_stock_renting : Security time warning Steps to reproduce: 1- Install Website, Rentals, Sales and Inventory modules 2- Set a security time in one of the rentals 3- Go to Rental settings and set 'Minimum Rental Days' to 1 Day or Delete the Hourly rental option from the product 4- Go to Website and try to rent the product and set the start date to be before the security time 5- The 'Your rental product cannot be prepared as fast, please rent later.' will not appear Current behavior before PR: When trying to rent a product through Website and the product has a security time if the 'Minimum Rental Days' is set with any duration that is not hours or if there is no Hourly rental option the security time warning will not appear. This happens because the condition that need to be passed to print this warning check if the duration is in hour or not which I think is not necessary because the security time has nothing to do with the UoM of the duration. This condition is only important to check if we will display hours option in the calendar widget or not. Desired behavior after PR is merged: This has been solved by removing the condition that checks if the duration's UoM is hours or not. Now we are just comparing the rental start date and the security time. opw-3553870 Forward-Port-Of: odoo/enterprise#53143