From 343c912a08dedbc21f0526f12a09b7a7fc75c0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 31 May 2011 10:51:47 +0200 Subject: [PATCH] Many2One target should be readonly if the field is readonly --- tryton/gui/window/view_form/view/form_gtk/many2one.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/view/form_gtk/many2one.py b/tryton/gui/window/view_form/view/form_gtk/many2one.py index 4f9f967307..34a9c0b0ac 100644 --- a/tryton/gui/window/view_form/view/form_gtk/many2one.py +++ b/tryton/gui/window/view_form/view/form_gtk/many2one.py @@ -150,7 +150,8 @@ class Many2One(WidgetInterface): context = self.field.context_get(self.record) return Screen(self.attrs['relation'], self.window, domain=domain, context=context, mode=['form'], - views_preload=self.attrs.get('views', {})) + views_preload=self.attrs.get('views', {}), + readonly=self._readonly) def sig_new(self, *args): self.focus_out = False