[FIX] expression: do not double quote column names
authorChristophe Simonis <chs@openerp.com>
Thu, 3 Apr 2014 08:45:24 +0000 (10:45 +0200)
committerChristophe Simonis <chs@openerp.com>
Thu, 3 Apr 2014 08:45:24 +0000 (10:45 +0200)
bzr revid: chs@openerp.com-20140403084524-9rb174osjrbmhgwc

openerp/osv/expression.py

index 9c70c0f..93e28dc 100644 (file)
@@ -1039,7 +1039,7 @@ class expression(object):
                     if self.has_unaccent and sql_operator.endswith('like'):
                         assert isinstance(right, basestring)
                         trans_left = 'unaccent(value)'
-                        left = 'unaccent("%s")' % (left,)
+                        left = 'unaccent(%s)' % (left,)
                         instr = 'unaccent(%s)'
                     elif sql_operator == 'in':
                         # params will be flatten by to_sql() => expand the placeholders