[FIX] hack to (not) evaluate normalized domains:

expression.py now always normalize its given domain, but the evaluation code
for the orm_memory is just lacking. The fix simply skips any operator.

bzr revid: vmt@openerp.com-20110726152122-hi8y65fixcx65me8
This commit is contained in:
Vo Minh Thu
2011-07-26 17:21:22 +02:00
parent 53ff3e9a13
commit 8522366247
+3
View File
@@ -2440,6 +2440,9 @@ class orm_memory(orm_template):
break
f = True
for arg in result:
if len(arg) != 3:
# Amazing hack: orm_memory handles only simple domains.
continue
if arg[1] == '=':
val = eval('data[arg[0]]'+'==' +' arg[2]', locals())
elif arg[1] in ['<', '>', 'in', 'not in', '<=', '>=', '<>']: