From fdb7b33d504ccd230f7d68e3e8fb3c6764f98095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 6 Nov 2024 13:24:46 +0100 Subject: [PATCH] Returns no view type when next view type is unknown Closes #13658 --- sao/src/screen.js | 2 +- tryton/tryton/gui/window/view_form/screen/screen.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sao/src/screen.js b/sao/src/screen.js index 85db45d234..0f496fd362 100644 --- a/sao/src/screen.js +++ b/sao/src/screen.js @@ -936,7 +936,7 @@ var views = this.views.concat(this.view_to_load) var next_view_index = (this.view_index + 1) % views.length; var next_view = views[next_view_index]; - if (typeof next_view != 'string') { + if (next_view && (typeof next_view != 'string')) { next_view = next_view.view_type; } return next_view; diff --git a/tryton/tryton/gui/window/view_form/screen/screen.py b/tryton/tryton/gui/window/view_form/screen/screen.py index 12b6c3042f..655da6c632 100644 --- a/tryton/tryton/gui/window/view_form/screen/screen.py +++ b/tryton/tryton/gui/window/view_form/screen/screen.py @@ -547,7 +547,7 @@ class Screen: views = self.views + self.view_to_load next_view_index = (self.view_index + 1) % len(views) next_view = views[next_view_index] - if not isinstance(next_view, str): + if next_view and not isinstance(next_view, str): next_view = next_view.view_type return next_view