Daily updates from Odoo
Wednesday, April 10, 2024
4 changes · saas-17.2
Resolved issues and error corrections
The point of sale numpad now shows the backspace and plus/minus buttons in their expected positions. This prevents cashier confusion and helps keep checkout input faster and more accurate.
Original PR description
Before this Commit: ========== - In the Numpad, the plus/minus, decimal point, and backspace buttons were displaced from their correct positions. After this Commit: ========== - The plus/minus, decimal point, and backspace buttons were correctly placed in the Numpad. task-3856515
This fix improves the reliability of automated tests for Odoo's mail, Discuss, and live chat features by preventing delayed background calls from one test affecting another. It is an internal quality fix that helps reduce false test failures without changing user-facing behavior.
Original PR description
HOOT keeps identity of mock server but resets it in-between tests. Tests could have some ongoing code that could trigger RPC, e.g.: - When typing in composer there's a 5 second timeout for sending…
HOOT keeps identity of mock server but resets it in-between tests. Tests could have some ongoing code that could trigger RPC, e.g.: - When typing in composer there's a 5 second timeout for sending "not typing" notification. - When observing a thread with new message, should notify server of new last message seen. Such RPCs of old tests could affect current test and make it fail. HOOT currently lacks proper test isolation with RPCs, so while this is being fixed discuss code implemented a workaround: use an env-bounded version of `rpc()`, so that envs of a given test are tracked and considered elligible during running of the test in question. The rough idea of this workaround works, but using a global `let rpc` was problematic, because it was overridden by new tests, which actually allowed old tests to invoke `rpcWithEnv` of the newer test. A solution is to save this env-bounded rpc on test-specific assets like `this` of service/component/record. This commit solves it by turning it into a `mail.rpc` service that internally contains `rpcWithEnv`. Services are designed to be env-aware, and their uses force developers to use `this`, therefore it feels natural to use a service to solve this issue.
This fixes an internal testing issue in the mail and live chat areas by ensuring requests from finished tests are blocked. It helps keep automated test results reliable and reduces the risk of false failures during development.
Original PR description
This utility function was used to bind an env to rpc, so that HOOT tests prevent handling RPCs of prior tests, i.e. tests that finished could still trigger RPCs that were intercepted in some other…
This utility function was used to bind an env to rpc, so that HOOT tests prevent handling RPCs of prior tests, i.e. tests that finished could still trigger RPCs that were intercepted in some other tests. At the time, we were not aware of HOOT feature of scopped param context for each test (suite). Thanks to this feature and RPC internal being easily globally patchable in test environment, we can slightly change its internal in HOOT to use scopped params in order to use same behaviour as `rpcWithEnv` but it's on whether the contextual start is allowed to make rpc or not. With this commit, tests that use mail `start` now have a patched version of RPC which blocks RPCs at end of test. Some technical notes on the implementation: 1. global variable `rpcPatched` is per HOOT test file, similarly to `rpc` function. Although it looks like the code only patches `rpc` once, it actually patches rpc once per test file being run. This is because global scope is "refreshed" for each file, so `rpc` function needs to be re-patched. 2. On the other hand, `defineParams()` used in start defines `MAIL_START.allowRpc` once per test. This allow to block RPC specifically to a test that has finished.
This fix avoids showing misleading browser console errors when valid screen templates are loaded later as part of a lazy-loaded bundle. It keeps stricter checks where needed so template issues are still caught without disrupting legitimate delayed loading.
Original PR description
With https://github.com/odoo/odoo/pull/160643, it is now easier to detect template extensions for which t-inherit attributes do not match any template name. Nevertheless the implementation should be…
With https://github.com/odoo/odoo/pull/160643, it is now easier to detect template extensions for which t-inherit attributes do not match any template name. Nevertheless the implementation should be improved. Consider the following situation. Have a template A be defined in a bundle 1 and a primary extension B defined in a bundle 2 that is lazy loaded. In that case an error is logged in the console while the template B can be effectively build browser side. The solution to that problem is to check if A is available only when the bundle 2 has been loaded and that all templates in 1 and 2 are known. Note that we don't delay the check for the other type of extensions (t-inherit-mode="extension") since we think it is a bad idea. Take the same situation as before but with B an extension with t-inherit-mode="extension". If OWL has already mounted a component with template A, we wouldn't know what to do with the extension. Keeping things simple, we still enforce (as before) that such an extension should be in the bundle of its parent.