[IMP] Element.getiterator -> Element.iter
> Note that this method is deprecated as of ElementTree 1.3 and lxml > 2.0. It returns an iterator in lxml, which diverges from the > original ElementTree behaviour. If you want an efficient iterator, > use the element.iter() method instead. You should only use this > method in new code if you require backwards compatibility with older > versions of lxml or ElementTree. bzr revid: xmo@openerp.com-20130422091958-413qo439qqgv296u
This commit is contained in:
parent
c9a6e74bf4
commit
9683224830
|
@ -184,12 +184,12 @@ class view(osv.osv):
|
|||
# Only compare the field name: 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).
|
||||
for node in arch.getiterator('field'):
|
||||
for node in arch.iter('field'):
|
||||
if node.get('name') == spec.get('name'):
|
||||
return node
|
||||
return None
|
||||
|
||||
for node in arch.getiterator(spec.tag):
|
||||
for node in arch.iter(spec.tag):
|
||||
if isinstance(node, SKIPPED_ELEMENT_TYPES):
|
||||
continue
|
||||
if all(node.get(attr) == spec.get(attr) for attr in spec.attrib
|
||||
|
|
Loading…
Reference in New Issue