projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb2722e
)
[Imp] Allow expressions: ".. child_of, 1" , not only list(1)
author
P. Christeas
<p_christ@hol.gr>
Thu, 8 Oct 2009 19:58:56 +0000
(22:58 +0300)
committer
P. Christeas
<p_christ@hol.gr>
Thu, 8 Oct 2009 19:58:56 +0000
(22:58 +0300)
bzr revid: p_christ@hol.gr-
20091008195856
-iyhz4abq51p871ip
bin/osv/expression.py
patch
|
blob
|
history
diff --git
a/bin/osv/expression.py
b/bin/osv/expression.py
index
cabc98e
..
b488cea
100644
(file)
--- a/
bin/osv/expression.py
+++ b/
bin/osv/expression.py
@@
-189,6
+189,8
@@
class expression(object):
if operator == 'child_of':
if isinstance(right, basestring):
ids2 = [x[0] for x in field_obj.name_search(cr, uid, right, [], 'like', limit=None)]
+ elif isinstance(right, (int, long)):
+ ids2 = list([right])
else:
ids2 = list(right)