[IMP] base: clarify view error position

In case of syntax error, show where the error is.
e.message is enmpty for syntax errors

Before:
Can't validate view:

After:
Can't validate view:
SyntaxError('invalid syntax', ('', 1, 51, "{'invisible': [('external_sale', '=', 'internal')]]}"))
This commit is contained in:
Martin Trigaux
2016-10-12 17:31:18 +02:00
parent 0acd63d073
commit 3154b8fefc
+1 -1
View File
@@ -1168,4 +1168,4 @@ actual arch.
try:
self.browse(vid)._check_xml()
except Exception as e:
self.raise_view_error("Can't validate view: %s" % e.message, vid)
self.raise_view_error("Can't validate view:\n%s" % (e.message or repr(e)), vid)