changeset 0da6611fd040 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset;node=0da6611fd040
description:
        Raise explicit message when view is missing XML

        issue9940
        review316651002
diffstat:

 trytond/model/modelview.py |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r 579f51ed2a78 -r 0da6611fd040 trytond/model/modelview.py
--- a/trytond/model/modelview.py        Sun Jan 03 13:00:26 2021 +0100
+++ b/trytond/model/modelview.py        Sun Jan 03 13:06:13 2021 +0100
@@ -316,6 +316,9 @@
                     # There is perhaps a new module in the directory
                     ModelView._reset_modules_list()
                     raise_p = True
+            if not result['arch']:
+                raise ValueError("Missing view architecture for %s" % ((
+                            cls.__name__, view_id, view_type),))
             parser = etree.XMLParser(remove_comments=True)
             tree = etree.fromstring(result['arch'], parser=parser)
             for view in views:

Reply via email to