[FIX] base: edge case of search on >/< and 0

The double inversion introduced by 6e063188 is done to catch default 0
values.

For example '>= -3' is transformed in "NOT what is found by < -3".

There was an issue with '> 0' and '< 0' since in these instance 0 don't
match and the inversion must not be done.

opw-703929
This commit is contained in:
Nicolas Lempereur 2017-01-12 15:10:03 +01:00
parent a1be7ca551
commit bf38fe4c5f
1 changed files with 2 additions and 2 deletions

View File

@ -293,13 +293,13 @@ class ir_property(osv.osv):
elif value <= 0 and operator == '>=':
operator = '<'
include_zero = True
elif value <= 0 and operator == '>':
elif value < 0 and operator == '>':
operator = '<='
include_zero = True
elif value >= 0 and operator == '<=':
operator = '>'
include_zero = True
elif value >= 0 and operator == '<':
elif value > 0 and operator == '<':
operator = '>='
include_zero = True