From a325aebe77c7ae3ef23124d78ab675c6a0f4b032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 3 Sep 2010 14:27:49 +0200 Subject: [PATCH] Fix search on many2many with a string as value --- trytond/model/modelsql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trytond/model/modelsql.py b/trytond/model/modelsql.py index 14b955609b..5e70e9059a 100644 --- a/trytond/model/modelsql.py +++ b/trytond/model/modelsql.py @@ -1482,9 +1482,9 @@ class ModelSQL(ModelStorage): table, domain[i][0])) else: if isinstance(domain[i][2], basestring): - res_ids = [x[0] for x in target_obj.search([ + res_ids = target_obj.search([ ('rec_name', domain[i][1], domain[i][2]), - ], order=[])] + ], order=[]) elif isinstance(domain[i][2], (int, long)) \ and not isinstance(domain[i][2], bool): res_ids = [domain[i][2]]