details:   https://code.tryton.org/tryton/commit/ce2aedc5174d
branch:    7.8
user:      Nicolas Évrard <[email protected]>
date:      Mon Apr 20 10:41:45 2026 +0200
description:
        Use a list of selection values to enable sorting in the filter window

        Closes #14785
        (grafted from 1b717a68570559857d7a6677f2010a39aab467a9)
diffstat:

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

diffs (16 lines):

diff -r 180798a2258b -r ce2aedc5174d 
tryton/tryton/gui/window/view_form/view/screen_container.py
--- a/tryton/tryton/gui/window/view_form/view/screen_container.py       Thu May 
07 13:34:06 2026 +0200
+++ b/tryton/tryton/gui/window/view_form/view/screen_container.py       Mon Apr 
20 10:41:45 2026 +0200
@@ -627,10 +627,10 @@
                     for selection in selections:
                         entry.append_text(selection)
                 elif field['type'] in ['selection', 'multiselection']:
-                    selections = tuple(x[1] for x in field['selection'])
+                    selections = [x[1] for x in field['selection']]
                     if field.get('sort', True):
                         selections.sort(key=operator.itemgetter(1))
-                    entry = Selection(selections)
+                    entry = Selection(tuple(selections))
                     entry.set_vexpand(True)
                 elif field['type'] in ('date', 'datetime', 'time'):
                     date_format = common.date_format(

Reply via email to