[FIX] expression: do not look at translation in parse when searching with empty string or false

This fixes traceback when applying filter 'is not set' on a translatable field

lp bug: https://launchpad.net/bugs/1208565 fixed

bzr revid: mat@openerp.com-20140127144913-qjh9hrnkfdn18sdb
This commit is contained in:
Martin Trigaux 2014-01-27 15:49:13 +01:00
parent d9cdc8564c
commit f2b2ee8eae
1 changed files with 1 additions and 1 deletions

View File

@ -1019,7 +1019,7 @@ class expression(object):
right += ' 23:59:59'
push(create_substitution_leaf(leaf, (left, operator, right), working_model))
elif field.translate:
elif field.translate and right:
need_wildcard = operator in ('like', 'ilike', 'not like', 'not ilike')
sql_operator = {'=like': 'like', '=ilike': 'ilike'}.get(operator, operator)
if need_wildcard: