Tuesday, December 26, 2023
9 changes · 17.0
Resolved issues and error corrections
This fix improves internal test error messages so they show the actual required field name when a required value is missing. It helps developers identify issues faster during testing, reducing time spent diagnosing failed tests.
Original PR description
Prior to this commit, when an empty required field triggered an error, the message was: AssertionError: {fname!r} is a required field.
After this commit, the error message specifies the name of the required field: AssertionError: my_field_name is a required field.
Description of the issue/feature this PR addresses:
Current behavior before PR:

Desired behavior after PR is merged:

---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis change fixes an unreliable automated test in the messaging area so it consistently checks that channel subscriptions renew correctly. It helps prevent false test results in the development pipeline without changing user-facing behavior.
Original PR description
The "Channel subscription is renewed when channel is left" test ensures the bus subscription is renewed when the user leaves the channel. In order to do so, the test relies on a patch of the bus service and awaits the `waitUntilSubscribe` helper. This is not correct: the subscription will never be triggered since the bus service method is patched to only call `assert.step`. This test passes most of the time by luck: `waitUntilSubscribe` detects the first subscription (the one that is triggered when starting the bus service) and the delay is most of the time enough for the step to be ready. This PR fixes the issue by: - waiting the first subscription to ensure it does not interfere with the test. - removing the bus service patch: waiting for the subscription is enough. fixes runbot-46941
This update fixes a display issue where the Q keyboard shortcut label overlapped with the filter removal button when shortcuts were shown. Users can now view shortcuts in the Field Service task list without confusing or cluttered controls.
Original PR description
Steps to reproduce: - go to field service > my tasks - press Alt to display keyboard shortcuts Observed behavior: the Q shortcut and the x button overlap Expected behavior: the x button should be hidden by the Q shortcut Task-3635644
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 fixes automated tests in the Stock Barcode module that were affected by a system-level change to how inventory movement records are ordered. The tests have been adjusted to ensure they continue to work correctly without changing what they actually test. This is a routine maintenance update to keep the system functioning properly.
Original PR description
odoo/odoo#143570 changes the default order on the `stock.move.line` model. Which means that some tests using this order as index references won't be aligned anymore and needs some adjustments. In order to avoid changing the meaning of the test, only had a `sorted()` before the comparisons to simulate the old default order. Forward-Port-Of: odoo/enterprise#52893 Forward-Port-Of: odoo/enterprise#52795
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