Saturday, February 10, 2024
3 changes · master
Resolved issues and error corrections
Odoo now handles errors while opening views in a consistent way, such as returning users to a list or previous screen instead of showing an empty page or behaving differently depending on how they navigated. This makes the web interface more reliable and less confusing when records are missing or cannot be loaded.
Original PR description
Before this commit, there are multiples different behaviours, handled by different parts of the code, when an error occurs when loading a view : - If we loaded a faulty form view (wrong id) from the…
Before this commit, there are multiples different behaviours, handled by different parts of the code, when an error occurs when loading a view : - If we loaded a faulty form view (wrong id) from the url, the page is reloaded on the multi-record view of the same action. - If we loaded a faulty form view (error in loading) from the url, an empty page is shown. - If we clicked on a deleted record (form view) on the breadcrumb, we stay on the current view. - If we clicked on the back button of the browser, that it lead us to a deleted record (form view), the page is reloaded on the multi-record view of the same action. - If we clicked on a previously deleted record in a multi-record view, we stay on the multi-record view. These multiple behaviours for handling errors when loading a view is confusing and error-prone. Now, the action service will handle all the behaviour when an error occurs when loading a view consistently : - If an error occurs when clicking on the breadcrumb, the previous view of the faulty one is loaded. - If an error occurs when loading a new view, from an url or from the back button, a multi-record view will be loaded. - If an error occurs when loading a new view, from another view, we stay on that view. Note that, this commit also fixes an issue in fetchRecordErrorHandler. Since [1], the handler was not working properly, it was raising another error because of a typographical error. This commit also fix the tests that weren't failing because they were doing a doAction and not a loadState. [1] : 016a72bae9c3194459b1f25d9ae5678ce50aead7
This update fixes and cleans up Odoo’s internal HOOT testing tools used by developers to validate web and messaging features. It improves test accuracy, reduces false failures, and makes future changes safer without directly changing end-user functionality.
Original PR description
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 This pull requests: - fixes linting errors in HOOT / HOOT-DOM - fixes issues with mock requests with simple string bodies - makes event helpers rely on mocked user agent or touch properties - properly handles the cleaning of registries after each test - moves test constants to a separate global file (instead of the session) - changes the default accessible URL in tests - exports missing HOOT-DOM helpers - fixes an issue with "multi" tests - changes the test/suite tags syntax from template tag to a named function --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Subscription sales orders with recurring products are already meant to have a recurring plan, but this change adds an extra safeguard. It prevents invoicing from crashing if an order without a plan is encountered, improving reliability in edge cases.
Original PR description
We prevent creating subscription sale orders with recurring products and no recurring plans However it's better to be defensive to avoid crashes. This commit adds an additional condition before accessing order_id.plan_id Task: 3725476