From c09a12e02f002bd34c2abcbdb9aa6249006dba78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 6 Oct 2014 22:29:46 +0200 Subject: [PATCH] Empty dict value should always be an empty dictionary The client should not detect as changed a Dict field with None as value. issue4231 review11531002 --- tryton/gui/window/view_form/model/field.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tryton/gui/window/view_form/model/field.py b/tryton/gui/window/view_form/model/field.py index 1766d00efa..24ae6aa386 100644 --- a/tryton/gui/window/view_form/model/field.py +++ b/tryton/gui/window/view_form/model/field.py @@ -884,6 +884,9 @@ class DictField(Field): _default = {} + def get(self, record): + return super(DictField, self).get(record) or self._default + def get_client(self, record): return super(DictField, self).get_client(record) or self._default