From bbb3b48622fab3da2dece6e838c8dd173ed33f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 2 Mar 2015 23:32:22 +0100 Subject: [PATCH] Dict search entry must behave like Many2Many search entry issue4577 review14041002 --- tryton/gui/window/view_form/view/form_gtk/dictionary.py | 2 +- tryton/gui/window/view_form/view/form_gtk/many2many.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tryton/gui/window/view_form/view/form_gtk/dictionary.py b/tryton/gui/window/view_form/view/form_gtk/dictionary.py index 8c2c84dbd8..d6ded4d3b3 100644 --- a/tryton/gui/window/view_form/view/form_gtk/dictionary.py +++ b/tryton/gui/window/view_form/view/form_gtk/dictionary.py @@ -439,7 +439,7 @@ class DictWidget(Widget): self._set_button_sensitive() for widget in self.fields.values(): widget.set_readonly(readonly) - self.wid_text.set_editable(not readonly) + self.wid_text.set_sensitive(not readonly) def _set_button_sensitive(self): self.but_add.set_sensitive(bool( diff --git a/tryton/gui/window/view_form/view/form_gtk/many2many.py b/tryton/gui/window/view_form/view/form_gtk/many2many.py index 19678d8df7..8874674d09 100644 --- a/tryton/gui/window/view_form/view/form_gtk/many2many.py +++ b/tryton/gui/window/view_form/view/form_gtk/many2many.py @@ -230,6 +230,7 @@ class Many2Many(Widget): def _readonly_set(self, value): self._readonly = value self._set_button_sensitive() + self.wid_text.set_sensitive(not value) def _set_button_sensitive(self): if self.record and self.field: @@ -240,7 +241,6 @@ class Many2Many(Widget): else: size_limit = False - self.wid_text.set_sensitive(not self._readonly) self.but_add.set_sensitive(bool( not self._readonly and not size_limit))