From b941e9fd9decaa6d91e5eee661c0befe9ea492ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 4 Feb 2018 23:41:05 +0100 Subject: [PATCH] Set also editable property when setting sensitive on Entry issue7074 review41791002 --- tryton/gui/window/view_form/view/form_gtk/dictionary.py | 1 + tryton/gui/window/view_form/view/form_gtk/many2many.py | 1 + tryton/gui/window/view_form/view/form_gtk/one2many.py | 1 + 3 files changed, 3 insertions(+) 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 877e4f4c9a..f2c7a65928 100644 --- a/tryton/gui/window/view_form/view/form_gtk/dictionary.py +++ b/tryton/gui/window/view_form/view/form_gtk/dictionary.py @@ -455,6 +455,7 @@ class DictWidget(Widget): for widget in self.fields.values(): widget.set_readonly(readonly) self.wid_text.set_sensitive(not readonly) + self.wid_text.set_editable(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 81a740cf8f..5b14fe64da 100644 --- a/tryton/gui/window/view_form/view/form_gtk/many2many.py +++ b/tryton/gui/window/view_form/view/form_gtk/many2many.py @@ -225,6 +225,7 @@ class Many2Many(Widget): self._readonly = value self._set_button_sensitive() self.wid_text.set_sensitive(not value) + self.wid_text.set_editable(not value) self._set_label_state() def _required_set(self, value): diff --git a/tryton/gui/window/view_form/view/form_gtk/one2many.py b/tryton/gui/window/view_form/view/form_gtk/one2many.py index 471d302a12..5fe1a07647 100644 --- a/tryton/gui/window/view_form/view/form_gtk/one2many.py +++ b/tryton/gui/window/view_form/view/form_gtk/one2many.py @@ -314,6 +314,7 @@ class One2Many(Widget): and access['write'] and access['read'])) self.wid_text.set_sensitive(self.but_add.get_sensitive()) + self.wid_text.set_editable(self.but_add.get_sensitive()) # New button must be added to focus chain to allow keyboard only # creation when there is no existing record on form view.