summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/services
diff options
context:
space:
mode:
authorJulien Castiaux <juc@odoo.com>2020-10-19 10:23:53 +0000
committerJulien Castiaux <juc@odoo.com>2020-10-19 10:38:08 +0000
commit7058e338a980268df1c502b8b2860bdd8be9f727 (patch)
treef4cfdba4bb99ca4e8368b00a05f80f5b8ef7a29c /addons/web/static/src/js/services
parentf7c950856a4230e0b045064cbb93e7b21afdedd8 (diff)
[FIX] web: raise Warning triggers a traceback
Create a Server Action with the following code: `raise Warning("")`, when the SA is executed it opens the crash manager with a traceback instead of the user error modal. The `odooExceptionTitleMap` data structure lists all Odoo exceptions that descend from UserError, this structure is used within the `rpc_error` function to filter pure Python exceptions from custom Odoo ones. opw-2365689 closes odoo/odoo#60248 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/services')
-rw-r--r--addons/web/static/src/js/services/crash_manager.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web/static/src/js/services/crash_manager.js b/addons/web/static/src/js/services/crash_manager.js
index 00cf4ae5620..b618607a47f 100644
--- a/addons/web/static/src/js/services/crash_manager.js
+++ b/addons/web/static/src/js/services/crash_manager.js
@@ -94,6 +94,7 @@ var CrashManager = AbstractService.extend({
'odoo.exceptions.MissingError': _lt("Missing Record"),
'odoo.exceptions.UserError': _lt("User Error"),
'odoo.exceptions.ValidationError': _lt("Validation Error"),
+ 'odoo.exceptions.Warning': _lt("Warning"),
};
this.browserDetection = new BrowserDetection();