From 8522366247e5e081146a3de6be49803b1f7d298b Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Tue, 26 Jul 2011 17:21:22 +0200 Subject: [PATCH] [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 --- openerp/osv/orm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 034042533ae..ffb3fb3a546 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -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', '<=', '>=', '<>']: