summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odoo/addons/base/models/ir_ui_view.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/odoo/addons/base/models/ir_ui_view.py b/odoo/addons/base/models/ir_ui_view.py
index fa9640a479e..3ed1603efb2 100644
--- a/odoo/addons/base/models/ir_ui_view.py
+++ b/odoo/addons/base/models/ir_ui_view.py
@@ -268,10 +268,10 @@ actual arch.
for view in self:
arch_fs = None
- xml_id = view.xml_id or view.key
read_file = self._context.get('read_arch_from_file') or \
('xml' in config['dev_mode'] and not view.arch_updated)
- if read_file and view.arch_fs and xml_id:
+ if read_file and view.arch_fs and (view.xml_id or view.key):
+ xml_id = view.xml_id or view.key
# It is safe to split on / herebelow because arch_fs is explicitely stored with '/'
fullpath = get_resource_path(*view.arch_fs.split('/'))
if fullpath: