[FIX] base: correct inheritance application

While `apply_inheritance_specs` apply most of its changes inplace, it may
completely replace the `arch_tree` if the root node is replaced.
This new root node wasn't used for `primary` views that inherit from
another.
This commit is contained in:
Christophe Simonis 2015-03-04 12:43:22 +01:00
parent 6626884255
commit 325de62f51
1 changed files with 1 additions and 2 deletions

View File

@ -536,10 +536,9 @@ class view(osv.osv):
parent_view = self.read_combined(
cr, uid, v.inherit_id.id, fields=fields, context=context)
arch_tree = etree.fromstring(parent_view['arch'])
self.apply_inheritance_specs(
arch_tree = self.apply_inheritance_specs(
cr, uid, arch_tree, view_arch, parent_view['id'], context=context)
if context.get('inherit_branding'):
arch_tree.attrib.update({
'data-oe-model': 'ir.ui.view',