The method view_loaded could be called after the searchview was destroyed, which is not really a good idea. As a side effect, this fixes a crash when a form view with a one2many switch to edit view, then discards the changes.
The method view_loaded could be called after the searchview was destroyed, which is not really a good idea. As a side effect, this fixes a crash when a form view with a one2many switch to edit view, then discards the changes.