summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2020-06-12 09:02:23 +0000
committerJeremy Kersten <jke@odoo.com>2020-06-19 15:03:11 +0000
commitadb908fb32bda137a6b2e8b734cdfe0d5f3a4262 (patch)
tree9741a6de40f39cb0a1c6f743136fe14a57781080
parentd5ba35cb7cd2cebbd53b11cbd8b9c73808e88ad5 (diff)
[FIX] base: arch should be required
The attribute has been lost during a previous commit e6695c72d8. This commit avoid that you can create an ir.ui.view without arch. Before this commit, if you try to create an ir.ui.view with type but no arch, the code will raise an exception in _check_xml: /odoo/addons/base/models/ir_ui_view.py, line 377, in _check_xml view_arch = etree.fromstring(view.arch.encode('utf-8')) AttributeError: 'bool' object has no attribute 'encode' Now, the user will have a warning on create, to say that View Arch field is required. Could be backported if reported X-original-commit: 4877bb4b650f5d1c52fefb06dec2fa568afcb121
-rw-r--r--odoo/addons/base/views/ir_ui_view_views.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/addons/base/views/ir_ui_view_views.xml b/odoo/addons/base/views/ir_ui_view_views.xml
index d100abf3584..57272c67db2 100644
--- a/odoo/addons/base/views/ir_ui_view_views.xml
+++ b/odoo/addons/base/views/ir_ui_view_views.xml
@@ -30,7 +30,7 @@
<page string="Architecture" name="architecture">
<button type="object" name="open_translations"
string="Edit Translations" class="oe_link oe_right"/>
- <field name="arch_base" string="View Architecture" widget="ace" options="{'mode': 'xml'}"/>
+ <field name="arch_base" string="View Architecture" widget="ace" options="{'mode': 'xml'}" required="1"/>
</page>
<page string="Access Rights" name="access_rights">
<field name="groups_id"/>