summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorSébastien Geelen (sge) <sge@odoo.com>2020-05-11 08:44:12 +0000
committerSébastien Geelen (sge) <sge@odoo.com>2020-06-30 13:59:23 +0000
commit6d93c725649c8f511c9ce5bc3a1abc1503d2ebd2 (patch)
tree0c469ec54195b93a32c6d7bb11734551009faa88 /addons/web/static/src/js
parentd24758db56ea49e13248ccf9284ebda544461390 (diff)
[IMP] base : improve messages text in access_error pop-ups
* Improve layout of access error messages from group restriction * Improve layout of access error messages from security records rules * Use the error title in the js crash manager when possible * adapt unit tests closes odoo/odoo#50369 Taskid: 2206787 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/services/crash_manager.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/addons/web/static/src/js/services/crash_manager.js b/addons/web/static/src/js/services/crash_manager.js
index ea0927a9f28..cb7e5c3b054 100644
--- a/addons/web/static/src/js/services/crash_manager.js
+++ b/addons/web/static/src/js/services/crash_manager.js
@@ -222,7 +222,12 @@ var CrashManager = AbstractService.extend({
return;
}
var message = error.data ? error.data.message : error.message;
- var title = _.str.capitalize(error.type) || _t("Something went wrong !");
+ var title = _t("Something went wrong !");
+ if (error.type) {
+ title = _.str.capitalize(error.type);
+ } else if (error.data && error.data.title) {
+ title = _.str.capitalize(error.data.title);
+ }
return this._displayWarning(message, title, options);
},
show_error: function (error) {