From 83d280fede000f56fbfea361deebd5024f775356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Sat, 12 Apr 2025 21:30:56 +0200 Subject: [PATCH] Display checkbox in multiselection in the filter window This applies the changes from 97e82c27dc17 to the filter window --- sao/src/sao.less | 7 +++++++ .../tryton/gui/window/view_form/view/screen_container.py | 3 +++ 2 files changed, 10 insertions(+) diff --git a/sao/src/sao.less b/sao/src/sao.less index 2bdc354478..09aec03e49 100644 --- a/sao/src/sao.less +++ b/sao/src/sao.less @@ -1261,6 +1261,13 @@ input.column-boolean { select[multiple] { min-height: 150px; max-height: 400px; + + option:before { + content: "☐ "; + } + option:checked:before { + content: "☑ "; + } } } diff --git a/tryton/tryton/gui/window/view_form/view/screen_container.py b/tryton/tryton/gui/window/view_form/view/screen_container.py index aa45d36b14..ded55160cc 100644 --- a/tryton/tryton/gui/window/view_form/view/screen_container.py +++ b/tryton/tryton/gui/window/view_form/view/screen_container.py @@ -159,6 +159,9 @@ class Selection(Gtk.ScrolledWindow): self.treeview.set_model(model) column = Gtk.TreeViewColumn() + select_cell = Gtk.CellRendererToggle() + select_cell.set_sensitive(False) + column.pack_start(select_cell, expand=False) cell = Gtk.CellRendererText() column.pack_start(cell, expand=True) column.add_attribute(cell, 'text', 0)