Daily updates from Odoo
Wednesday, January 29, 2025
1 change · saas-17.2
Resolved issues and error corrections
When a user deletes or archives a record opened directly from a URL, Odoo now avoids showing an empty or broken record page. If there is no previous page to return to, the system safely redirects to the default application, reducing errors and confusion.
Original PR description
- open a record with an URL: `/{model}/{id}`;
- delete or archive the record;
Before this commit, an empty form view was displayed, with an incorrect URL: `/{model}/new`. This form view was inconsistent, and would throw an error in some applications (such as accounting). Even if no error was thrown, an error would be thrown if the user clicked on the 'back' button.
This is not the correct behaviour, when deleting or archiving a record, the correct behaviour is :
- if a pager exists, display the next record;
- if not, return to the previous controller (the previous action, usually the multi-record view);
The issue here is that we don't have a previous action or a multi-record view.
Now, in this particular case, we will fallback to the default application.
opw-4354129