[FIX] don't break when an attribute node in an xpath makes the
expression not match the node any more. Fixes #885pull/2494/head
parent
2d4ba31965
commit
135b9f2fa7
|
@ -3,7 +3,7 @@
|
|||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
||||
{
|
||||
"name": "Extended view inheritance",
|
||||
"version": "10.0.1.0.0",
|
||||
"version": "10.0.1.0.1",
|
||||
"author": "Therp BV,Odoo Community Association (OCA)",
|
||||
"license": "LGPL-3",
|
||||
"category": "Hidden/Dependency",
|
||||
|
|
|
@ -11,6 +11,10 @@
|
|||
<attribute name="context" operation="python_dict" key="default_name">'The company name'</attribute>
|
||||
<attribute name="context" operation="python_dict" key="default_company_id">context.get('company_id', context.get('company'))</attribute>
|
||||
</field>
|
||||
<!-- without operations, the standard handler should be called /-->
|
||||
<field name="parent_id" position="attributes">
|
||||
<attribute name="name">parent_id</attribute>
|
||||
</field>
|
||||
<form position="inside">
|
||||
<notebook>
|
||||
<page string="Phone numbers" name="phone_book" />
|
||||
|
|
|
@ -55,6 +55,9 @@ class IrUiView(models.Model):
|
|||
yield node, handler
|
||||
return
|
||||
if spec.get('position') == 'attributes':
|
||||
if all(not c.get('operation') for c in spec):
|
||||
yield spec, self._get_inheritance_handler(spec)
|
||||
return
|
||||
for child in spec:
|
||||
node = etree.Element(spec.tag, **spec.attrib)
|
||||
node.insert(0, child)
|
||||
|
|
Loading…
Reference in New Issue