From 715ffa2db51576732edda31b71546571560b07e0 Mon Sep 17 00:00:00 2001 From: "Olivier Laurent, Olivier Dony" <> Date: Mon, 20 Sep 2010 14:23:20 +0200 Subject: [PATCH] [IMP] orm.fields_view_get: non-xpath view inheritance should ignore field attributes but the "name" bzr revid: odo@openerp.com-20100920122320-6pixw87hzpq7kwds --- bin/osv/orm.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 67360050212..3f259dd66bc 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -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