From 53e943f5cb81c4e9dbbc6fb0087c32f22fe83573 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Mon, 17 Nov 2014 12:57:54 +0100 Subject: [PATCH] One2One field should return None when field has no value review12691002 issue4335 --- trytond/model/fields/one2one.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/model/fields/one2one.py b/trytond/model/fields/one2one.py index 7e29afd597..a16c23b093 100644 --- a/trytond/model/fields/one2one.py +++ b/trytond/model/fields/one2one.py @@ -25,7 +25,7 @@ class One2One(Many2Many): ''' res = super(One2One, self).get(ids, model, name, values=values) for i, vals in res.iteritems(): - res[i] = vals[0] if vals else False + res[i] = vals[0] if vals else None return res def set(self, Model, name, ids, value, *args):