From 8dc319a4cb384a781610dcfec8def43c35384c43 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Mon, 11 Mar 2024 12:18:19 +0100 Subject: [PATCH] Set current record after copying records Since ab82d479eca1 the current record is no longer set on load call Closes #12820 --- tryton/tryton/gui/window/view_form/screen/screen.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tryton/tryton/gui/window/view_form/screen/screen.py b/tryton/tryton/gui/window/view_form/screen/screen.py index 268b49160d..78b058e330 100644 --- a/tryton/tryton/gui/window/view_form/screen/screen.py +++ b/tryton/tryton/gui/window/view_form/screen/screen.py @@ -823,7 +823,10 @@ class Screen: context=self.context) except RPCException: return False - self.load(new_ids, position=self.new_position) + self.group.load(new_ids, position=self.new_position) + if new_ids: + self.current_record = self.group.get(new_ids[0]) + self.display() return True def set_tree_state(self):