Many2One target should be readonly if the field is readonly

This commit is contained in:
Cédric Krier committed 2011-05-31 10:51:47 +02:00
1 parent d5a4fd3d28
commit 343c912a08
1 file changed
+2 -1
@@ -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