[FIX] base: fix dev mode when view is no more in addons-path

This commit is contained in:
Jeremy Kersten
2017-02-24 08:51:26 +01:00
parent c59d79da3c
commit f4ae1a63c7
+7 -3
View File
@@ -224,9 +224,13 @@ actual arch.
if 'xml' in config['dev_mode'] and view.arch_fs and view.xml_id:
# It is safe to split on / herebelow because arch_fs is explicitely stored with '/'
fullpath = get_resource_path(*view.arch_fs.split('/'))
arch_fs = get_view_arch_from_file(fullpath, view.xml_id)
# replace %(xml_id)s, %(xml_id)d, %%(xml_id)s, %%(xml_id)d by the res_id
arch_fs = arch_fs and resolve_external_ids(arch_fs, view.xml_id)
if fullpath:
arch_fs = get_view_arch_from_file(fullpath, view.xml_id)
# replace %(xml_id)s, %(xml_id)d, %%(xml_id)s, %%(xml_id)d by the res_id
arch_fs = arch_fs and resolve_external_ids(arch_fs, view.xml_id)
else:
_logger.warning("View %s: Full path [%s] cannot be found.", view.xml_id, view.arch_fs)
arch_fs = False
view.arch = arch_fs or view.arch_db
def _inverse_arch(self):