Monday, May 19, 2025
1 change · saas-18.1
Resolved issues and error corrections
This fixes a timing issue where closing a popup dialog could reload the main page after the user had already started making new changes. The update waits for the main view refresh to finish before closing the dialog, helping prevent lost edits and avoiding cases where editable lists stop responding.
Original PR description
- On a slow connection; - In a list view (or a form view), click on a button (a view button); - Make some changes and click on the Discard button; - Make some changes in the main view. Because the…
- On a slow connection; - In a list view (or a form view), click on a button (a view button); - Make some changes and click on the Discard button; - Make some changes in the main view. Because the connection is slow, the main view reloads after the user has made some changes. This causes some issues, for example : the changes may be lost, editable list views may become uneditable, forcing the user to click again. This happens because on the action service, the callback function (`onClose`) is called after the dialog is closed. In the case of a view button, the callback function will reload the main view. This commit, is related to [1], in which an almost identical issue was resolved. The difference is that in previous commit the user clicked on the `Save` button in the dialog; whereas in this commit, it is the `Discard` button that is causing the issues. This commit changes that order, we will wait for the execution of the callback to complete before closing the dialog. [1] : https://github.com/odoo/odoo/commit/31c00161fd3a77c9fbd260754cb8c142fcb0d652