[IMP] orm.fields_view_get: non-xpath view inheritance should ignore field attributes but the "name"

bzr revid: odo@openerp.com-20100920122320-6pixw87hzpq7kwds
This commit is contained in:
Olivier Laurent, Olivier Dony 2010-09-20 14:23:20 +02:00 committed by Olivier Dony
parent a87fef6cdf
commit 715ffa2db5
1 changed files with 8 additions and 0 deletions

View File

@ -1541,6 +1541,14 @@ class orm_template(object):
else:
for n in node.getiterator(node2.tag):
res = True
if node2.tag == 'field':
# only compare field names, a field can be only once in a given view
# at a given level (and for multilevel expressions, we should use xpath
# inheritance spec anyway)
if node2.get('name') == n.get('name'):
return n
else:
continue
for attr in node2.attrib:
if attr == 'position':
continue