[FIX] Expression : Corrected the domain evaluation for system defined fields
authorJay Vora (OpenERP) <jvo@tinyerp.com>
Mon, 11 Apr 2011 19:07:35 +0000 (00:37 +0530)
committerJay Vora (OpenERP) <jvo@tinyerp.com>
Mon, 11 Apr 2011 19:07:35 +0000 (00:37 +0530)
lp bug: https://launchpad.net/bugs/757366 fixed

bzr revid: jvo@tinyerp.com-20110411190735-4koio7a9wigp4045

bin/osv/expression.py

index 1bc2325..5d0bed2 100644 (file)
@@ -135,7 +135,7 @@ class expression(object):
                 if left == 'id' and operator == 'child_of':
                     dom = _rec_get(right, working_table)
                     self.__exp = self.__exp[:i] + dom + self.__exp[i+1:]
-                elif left != 'id':
+                elif left not in ['id', 'write_uid', 'write_date', 'create_uid', 'create_date']:
                     raise ValueError('Bad Domain Evaluation! %r' % (e,))
                 continue