From b591f41759537e97ccc5177cdc3b8da9d2a2d466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 13 Mar 2008 15:54:49 +0100 Subject: [PATCH] Remove old =like argument for search --- trytond/osv/orm.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/trytond/osv/orm.py b/trytond/osv/orm.py index 70080a2061..e4468f8d31 100644 --- a/trytond/osv/orm.py +++ b/trytond/osv/orm.py @@ -2220,21 +2220,17 @@ class ORM(object): if arg[0] in table._columns: qu2.append(table._columns[arg[0]].\ _symbol_set[1](arg[2])) - if arg[1] == '=like': - arg1 = 'like' - else: - arg1 = arg[1] if arg[0] in table._columns: if arg[1] in ('like', 'ilike'): qu1.append('(%s.%s %s %s)' % (table._table, - arg[0], arg1, '%s')) + arg[0], arg[1], '%s')) else: qu1.append('(%s.%s %s %s)' % (table._table, - arg[0], arg1, + arg[0], arg[1], table._columns[arg[0]]._symbol_set[0])) else: qu1.append('(%s.%s %s \'%s\')' % \ - (table._table, arg[0], arg1, arg[2])) + (table._table, arg[0], arg[1], arg[2])) if add_null: qu1[-1] = '('+qu1[-1]+' or '+arg[0]+' is null)'