diff options
| author | Christophe Simonis <chs@openerp.com> | 2013-07-19 11:19:03 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@openerp.com> | 2013-07-19 11:19:03 +0200 |
| commit | 03381c761ddd7c0147d4cd3db21ce33b140ececc (patch) | |
| tree | 36ec7dee00caf587683947d2e26ba444053400f2 | |
| parent | 1e9789baf8cae0c09b3919846071c51b26e769ee (diff) | |
[FIX] expression: a valid leaf must have a non empty string as first element or be the magic TRUE_LEAF/FALSE_LEAF
lp bug: https://launchpad.net/bugs/1197323 fixed
bzr revid: chs@openerp.com-20130719091903-28ez0txxyjh6qiii
| -rw-r--r-- | openerp/osv/expression.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openerp/osv/expression.py b/openerp/osv/expression.py index 58f35149ddd..7f8ef5166a3 100644 --- a/openerp/osv/expression.py +++ b/openerp/osv/expression.py @@ -399,7 +399,9 @@ def is_leaf(element, internal=False): INTERNAL_OPS += ('inselect',) return (isinstance(element, tuple) or isinstance(element, list)) \ and len(element) == 3 \ - and element[1] in INTERNAL_OPS + and element[1] in INTERNAL_OPS \ + and ((isinstance(element[0], basestring) and element[0]) + or element in (TRUE_LEAF, FALSE_LEAF)) # -------------------------------------------------- |
