details: https://code.tryton.org/tryton/commit/c04d3f52d5da
branch: 7.0
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
(grafted from a157b66bb2d4b8c7e475c22247a4edd84ce12c10)
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 23e3d3d1d1b1 -r c04d3f52d5da
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
@@ -923,11 +923,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)