From 5243a43d730123a2ce4831f7f7848fedefa511c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 18 May 2013 19:13:12 +0200 Subject: [PATCH] Fix validation of domain for One2One fields issue3206 review852003 --- trytond/model/modelstorage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trytond/model/modelstorage.py b/trytond/model/modelstorage.py index 043c24bfe7..1959099a01 100644 --- a/trytond/model/modelstorage.py +++ b/trytond/model/modelstorage.py @@ -952,7 +952,7 @@ class ModelStorage(Model): domain = PYSONDecoder(env).decode(pyson_domain) relation_ids = [] if getattr(record, field_name): - if field._type in ('many2one',): + if field._type in ('many2one', 'one2one'): relation_ids.append( getattr(record, field_name).id) else: @@ -972,7 +972,7 @@ class ModelStorage(Model): relation_ids = [] for record in records: if getattr(record, field_name): - if field._type in ('many2one',): + if field._type in ('many2one', 'one2one'): relation_ids.append( getattr(record, field_name).id) else: