details:   https://code.tryton.org/tryton/commit/a157b66bb2d4
branch:    default
user:      Cédric Krier <[email protected]>
date:      Tue Oct 28 17:19:38 2025 +0100
description:
        Remove the first view_ids when opening the Many2One target from tree 
view

        Closes #14328
diffstat:

 tryton/tryton/gui/window/view_form/view/list_gtk/widget.py |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 34ffdbb7306e -r a157b66bb2d4 
tryton/tryton/gui/window/view_form/view/list_gtk/widget.py
--- a/tryton/tryton/gui/window/view_form/view/list_gtk/widget.py        Tue Oct 
28 17:17:31 2025 +0100
+++ b/tryton/tryton/gui/window/view_form/view/list_gtk/widget.py        Tue Oct 
28 17:19:38 2025 +0100
@@ -934,11 +934,13 @@
             return
         target_id = self.id_from_value(field.get(record))
 
+        # Remove first tree view as mode is form only
+        view_ids = self.attrs.get('view_ids', '').split(',')[1:]
         breadcrumb = list(self.view.screen.breadcrumb)
         breadcrumb.append(
             field.attrs.get('string') or common.MODELNAME.get(model))
         screen = Screen(model, domain=domain, context=context,
-            mode=['form'], view_ids=self.attrs.get('view_ids', '').split(','),
+            mode=['form'], view_ids=view_ids,
             exclude_field=field.attrs.get('relation_field'),
             breadcrumb=breadcrumb)
 

Reply via email to