[FIX] ir.qweb: branding breaks editing/inheritance
Could not edit t-field content if modified by inherit xpath, and could not inherit qweb views with non "xpath" nodes with `position="attributes"`. Examples: Can't edit: `<data><xpath expr="div[@t-field='object.test']" position="replace"><div t-field="object.test"/></xpath></data>` Inherit doesn't work: `<data><h1 position="replace"/><h1 class="test">tata</h1></data>` Closes #11561 Closes #11547
This commit is contained in:
parent
bbb317c547
commit
d3557de746
|
@ -398,7 +398,7 @@ class view(osv.osv):
|
|||
def inherit_branding(self, specs_tree, view_id, root_id):
|
||||
for node in specs_tree.iterchildren(tag=etree.Element):
|
||||
xpath = node.getroottree().getpath(node)
|
||||
if node.tag == 'data' or node.tag == 'xpath':
|
||||
if node.tag == 'data' or node.tag == 'xpath' or node.get('position') or node.get('t-field'):
|
||||
self.inherit_branding(node, view_id, root_id)
|
||||
else:
|
||||
node.set('data-oe-id', str(view_id))
|
||||
|
|
Loading…
Reference in New Issue