From 60f0bd08eec2d1b513549f5714f6c1c3e2a06045 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 23 Apr 2013 20:19:26 +0200 Subject: [PATCH] [FIX] expression: allow creating child_of expression even if "id" field has been redefined, courtesy of Gustavo Adrian Marino lp bug: https://launchpad.net/bugs/1030942 fixed lp bug: https://launchpad.net/bugs/1131992 fixed bzr revid: chs@openerp.com-20130423181926-yk628txd6yiybtko --- openerp/osv/expression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/osv/expression.py b/openerp/osv/expression.py index ba00c2caa91..8d0e9376277 100644 --- a/openerp/osv/expression.py +++ b/openerp/osv/expression.py @@ -791,7 +791,7 @@ class expression(object): leaf.add_join_context(next_model, working_model._inherits[next_model._name], 'id', working_model._inherits[next_model._name]) push(leaf) - elif not field and left == 'id' and operator == 'child_of': + elif left == 'id' and operator == 'child_of': ids2 = to_ids(right, working_model, context) dom = child_of_domain(left, ids2, working_model) for dom_leaf in reversed(dom):