Wednesday, April 24, 2024
8 changes
1 change
Resolved issues and error corrections
This update improves Odoo's internal HOOT testing framework and adjusts related tests in Mail, Live Chat, and Web. It helps developers catch problems more reliably without changing normal business workflows for end users.
Original PR description
## Pull Request HOOT (PRHOOT) - part 15 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4:…
## Pull Request HOOT (PRHOOT) - part 15 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10: https://github.com/odoo/odoo/pull/155639 Part 11: https://github.com/odoo/odoo/pull/156255 / https://github.com/odoo/enterprise/pull/58135 Part 12: https://github.com/odoo/odoo/pull/156869 Part 13: https://github.com/odoo/odoo/pull/158384 / https://github.com/odoo/enterprise/pull/59019 Part 14: https://github.com/odoo/odoo/pull/158916 Enterprise: https://github.com/odoo/enterprise/pull/59971 This pull requests brings various improvements and fixes to Hoot and the Odoo unit test ecosystem. See the different commit messages for more details. Note: these changes are made in stable to avoid having to support multiple versions of the HOOT API. As such, these changes are intended to be strictly limited to unit tests as to not put the rest of the code base at risk. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
4 changes
Resolved issues and error corrections
This fix adjusts accounting report tests so they can correctly generate report templates that include images or other assets. It helps prevent test deadlocks and improves the reliability of automated checks without changing business functionality.
Original PR description
When a template is rendered wkhtmltopdf kicks-in in a subprocess and makes HTTP GET requests for all the assets / images found inside the document. For those HTTP requests to succeed (1) the web server must up and running, (2) the cursor must be the same for serving the HTTP request and for running the test. (1) is achieved by running the test post-install as the web server is started after at-install tests and before post-install ones. (2) is achieved by being in "test mode", a mode where all new registries (no what the current thread) will reuse a same cursor (typically the one used by the test). The registry is automatically in test-mode when using the HttpCase test class. When the TransactionCase class is in-used, entering/leaving the test mode must be done manually. --- Related to community PR: https://github.com/odoo/odoo/pull/161438 The introduction of a new lock on inside the threaded-server to solve a long-running odoo-sh bug made those tests deadlock.
3 changes
Resolved issues and error corrections
This update fixes a performance issue in the Appointment module's test suite where an extra database query was causing test failures in no-demo mode. The fix ensures the automated testing process runs smoothly without unnecessary database calls that could impact system performance.
Original PR description
A single additional query makes runbot break. runbot-62073 Forward-Port-Of: odoo/enterprise#61347
This fixes broken color highlighting in the Manufacturing Master Production Schedule after a Bootstrap upgrade. Users should again see the intended subtle background colors that help distinguish planning lines and statuses.
Original PR description
With the upgrade to bootstrap 5.3 in odoo/odoo#158560, using `alert-` alone does not work anymore. It was already the wrong use of `alert-` since it is not supposed to be used to change background colors. This PR replaces `alert-*` with `bg-*-subtle` to repair the broken behavior.
The paper-related setting for self-order preparation displays was moved out of the general preparation display area and into the correct self-order module. This prevents the setting from appearing or being used where it does not apply, reducing configuration confusion and avoiding incorrect behavior.
Original PR description
pos*: pos_preparation_display, pos_self_order_preparation_display A previous commit (odoo/enterprise#59959) has introduced a field `has_paper` in the pos_config. This field is introduced in the module pos_self_order and should only be used in this context. The problem here is that it was used in the pos_preparation_display module which is not correct. This commit fixes this by moving the changes brought by the first commit in the correct module 'pos_self_order_preparation_display'.
This fix improves how Odoo handles inherited view conditions that combine rules with “and” or “or”. It helps prevent false errors or unintended changes when customizing views in affected business apps.
Original PR description
The inheritance for python expression can use 'and' and 'or' separator. The expression will automatically wrapped by parenthesis to avoid any alteration of the previous expression. task-3433721 liked merged pr: #104741 https://github.com/odoo/odoo/pull/161129
Fixed a test failure in the survey module related to duplicate session codes. When creating multiple surveys at once, each survey requires a unique session code. This fix ensures the test properly handles the uniqueness requirement, preventing test failures that could mask real issues.
Original PR description
Surveys cannot be created in batch without `session_code` because it must be unique across surveys. Technically, using a 5-digit codes makes it unlikely that a collision occurs with records created without explicit session_code (see Survey._get_default_session_code's iterative process). See runbot 55709 See also related runbot 25041 Task-3829536 Forward-Port-Of: odoo/odoo#159882
This fix resolves a test failure in the Manufacturing Accounting module that occurred when running tests without demo data. The test was unable to properly validate user access permissions because a required field wasn't visible. The fix enables the necessary product variant settings for the test user, ensuring the test runs successfully in all environments.
Original PR description
The test needs to set `product_id` field in order to check user's access. However, the field is not visible without enabling product variants, which makes the test fail in an environment with no demo data. This commit fixes the issue by adding the MRP manager to the 'product.group_product_variant' group. The issue was introduced in #162107 . Related build error: https://runbot.odoo.com/web#id=61998&cids=1&menu_id=405&action=573&model=runbot.build.error&view_type=form 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-pr Forward-Port-Of: odoo/odoo#162814