Add test for inherit view to have the same model than the inherited one
This commit is contained in:
1 parent
1a1e5baa9e
commit
8939fe0587
1 file changed
+8
@@ -64,6 +64,14 @@ class View(OSV):
|
||||
xml = view.arch.strip()
|
||||
tree = etree.fromstring(xml)
|
||||
|
||||
if view.inherit:
|
||||
if view.model != view.inherit.model:
|
||||
logger = logging.getLogger('ir')
|
||||
logger.error('Invalid model "%s" ' \
|
||||
'with inherited model "%"' % \
|
||||
(view.model, view.inherit.model))
|
||||
return False
|
||||
|
||||
# validate the tree using RelaxNG
|
||||
rng_name = os.path.join(os.path.dirname(__file__),
|
||||
(view.inherit and view.inherit.type or view.type) + '.rng')
|
||||
|
||||
Reference in new issue
Block a user