Thursday, June 17, 2021
2 changes · master
Resolved issues and error corrections
This fixes cases where Odoo ignored a requested search view and fell back to the default one. Users in affected areas should now see the intended filters and search layout more reliably.
Original PR description
Passing an id directly to `search_view_id` is not working. It is silently ignored. The framework js code expects an id/name pair, as described in the ORM doc. Most of the time, this will be unoticed as the specified search view being ignored, the default one will be used instead, which is often the same one as there is only one search view. Only 3 occurences are real misbehavior. Note that the `name` of the pair is useless, you can just pass the ID in an array. Working: 'search_view_id': [123, 'search'], 'search_view_id': [123], Not working: 'search_view_id': 123, **Technical explanation:** It will silently just ignore the value set to `search_view_id` in Javascript [here](https://github.com/odoo/odoo/blame/master/addons/web/static/src/js/chrome/action_manager_act_window.js#L424) since ```javascript const a = 123; const b = a && a[0]; // this is undefined ``` Noticed on https://github.com/odoo/odoo/pull/71826#discussion_r652720721
This update stabilizes an automated test for the Documents Spreadsheet area that was failing unpredictably during validation. It helps keep release checks dependable without changing user-facing behavior.
Original PR description
The test introduced in 8e3dd4f fails randomly on runbot. I couldn't reproduce it locally. This commit attempts to fix the issue. QUnit tests have run more than 100x with this commit on runbot without failing. Hopefully, it's ok now :) https://runbot.odoo.com/web/#cids=1&id=1811&model=runbot.build.error&view_type=form&menu_id=