[MERGE] [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

bzr revid: mat@openerp.com-20140127160019-mf0l0ded14g741df
This commit is contained in:
Martin Trigaux 2014-01-27 17:00:19 +01:00
commit b0e7dd9382
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: