Tuesday, April 23, 2024
6 changes
1 change
Resolved issues and error corrections
Corrects subscription-related list settings so new entries are added in the expected place when lists span multiple pages. This reduces confusion and prevents records from appearing on the wrong page during editing.
Original PR description
The "editable" attribute in list views can be set to either "top" or "bottom". List views are rng validated, and no other value can be used. However, x2many list inside form views aren't validated, and a few of them have editable="1". This seems to work, but only partially: the list is editable indeed, but if the list is multi page, there'll be issues when adding records (they'll be added in the last page, not the current one). This commit thus fixes the few views with incorrect editable attribute. opw~3860903
5 changes
Resolved issues and error corrections
This fix removes an unnecessary restriction that prevented some employees from seeing the Documents button in their profile. Now all internal employees can access the Documents application from their profile to view their important documents like contracts and payslips, regardless of their specific user permissions.
Original PR description
HOW TO REPRODUCE ================ Log in as an internal user who is not a member of the `documents_user` group. Go to your profile. You should see the "Documents" smart button. However, the button has a `groups` attribute to restrict its visibility to the members of the `documents_user` group. HOW TO FIX ========== This issue is already known and a tolerated side-effect (see this [commit](https://github.com/odoo/odoo/pull/29659/commits/3651a3721865a465f5457b67436939a91f904bd1)) Moreover, it makes sense for any internal user to be able to access the Documents application, whether they have rights on it or not. As an employee, they may have documents they need to access (e.g.: contract, payslip...) The solution would be to remove the `groups` attribute from the smart button to reduce confusion among developers. And also, clarify that, indeed, any internal users can see the "Documents" smart button in their profile. task-3688377
A recent update to the website module contained a typo in a template where "full string" was incorrectly used instead of "full screen". This fix corrects that typo to ensure the website displays the proper text to users.
Original PR description
Recent commit [1] made a typo when converting templates [1]: https://github.com/odoo/odoo/commit/02461534d2b74410bcdfb5cccaac8157fe806127
This update fixes tests in the web interface that were randomly failing due to timing issues. The tests now wait the correct amount of time for the system to process URL changes and update the display, making the tests more reliable and reducing false failures.
Original PR description
Before this commit, several qunit load state tests sometimes failed. They all follow the same pattern: - trigger an "hashchange" event to simulate an update of the url - wait twice for nextTick -…
Before this commit, several qunit load state tests sometimes failed. They all follow the same pattern: - trigger an "hashchange" event to simulate an update of the url - wait twice for nextTick - check the DOM reflects the url change However, waiting for 2 ticks isn't enough. Indeed, when the url hash is set, our mock location object dispatches a "real" hashchange event on window, but it does it after a setTimeout [1]. Then, the webclient is notified (via the router service) of the url change, and reacts by loading the appropriate action. This then requires 2 ticks, because we first clear the DOM with the BlankComponent, and then we mount the requested action/view. This commit makes those tests more robust by waiting for a setTimeout before the 2 nextTicks. [1] https://github.com/odoo/odoo/blob/1882d8f89f760bd1ff8a2bf0ae798939402647a3/addons/web/static/tests/setup.js#L52 Runbot issue~37030 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
Fixed incorrect demo data in the survey module where a sample user response was marked as correct when it should have been incorrect. The answer "Pinaceae" was being treated as correct for the question about Dogwood's tree family, when the correct answer is actually "Cornaceae". This correction ensures the demo data accurately reflects the proper quiz answers.
Original PR description
Fix the demo user input lines which were considering "Pinaceae" as a correct answer to the question "Dogwood is from which family of trees ?" even though the suggested answer was declared as incorrect for the question. Dogwood is indeed from the "Cornaceae" family of trees, not the "Pinaceae". Fixing the issue by updating the user input lines to be incorrect. related: odoo/odoo#72298 Task-3856668 Forward-Port-Of: odoo/odoo#162392 Forward-Port-Of: odoo/odoo#160911
A test in the profiling system was failing randomly due to unexpected data in the test assertions. The fix removes the unreliable final checks from the test, focusing only on the data that matters for validation. This makes the test more stable and prevents false failures.
Original PR description
This test can sometimes fail randomly
```
FAIL: TestProfiling.test_sync_recorder
Traceback (most recent call last):
File "/data/build/odoo/odoo/addons/base/tests/test_profiler.py", line 440, in test_sync_recorder
self.assertEqual(stacks_methods, [
AssertionError: Lists differ: [['a'[114 chars]], ['__exit__', '_remove'], ['__exit__'], ['__exit__', 'stop']] != [['a'[114 chars]], ['__exit__', 'stop']]
First differing element 11:
['__exit__', '_remove']
['__exit__', 'stop']
First list contains 2 additional elements.
First extra element 12:
['__exit__']
[['a'],
['a', 'b'],
['a'],
['a', 'c'],
['a', 'c', 'd'],
['a', 'c'],
['a', 'c', 'd'],
['a', 'c'],
['a'],
[],
['__exit__'],
- ['__exit__', '_remove'],
- ['__exit__'],
['__exit__', 'stop']]
```
Since we don't care about the last lines, just remove them from the assertion.