In --dev mode, when a view can't be loaded from the file in spite of
being referenced in field `arch_fs`, the current behavior is to raise
an exception. In most cases, developpers don't want the view to fail
so the behavior has been changed in favor of a logger warning and
a fallback to `arch_db`.
node.tag = 'data'
node.attrib.pop('id', None)
return etree.tostring(node)
- raise ValueError("Could not find view arch definition in file '%s' for xmlid '%s'" % (filename, xmlid))
+ _logger.warning("Could not find view arch definition in file '%s' for xmlid '%s'" % (filename, xmlid))
+ return None
xpath_utils = etree.FunctionNamespace(None)
xpath_utils['hasclass'] = _hasclass