diff options
| author | fja-odoo <fja@odoo.com> | 2019-07-25 11:42:56 +0000 |
|---|---|---|
| committer | fja-odoo <fja@odoo.com> | 2019-07-30 16:01:20 +0000 |
| commit | 5ac167a85bde69460f8729bd4af3b249d05849fd (patch) | |
| tree | f74408784d850406104033e178d97cf9456628e9 /addons/web/static/src/js/public/public_crash_manager.js | |
| parent | 09681e566013433157fd96818ed7b767a14ef758 (diff) | |
[IMP] web: revert warnings display in back-end
Fix for: https://github.com/odoo/odoo/pull/32132
We had changed the display of the warnings in the back-end to be like the
front-end (notification toast). This change needs to be reverted. Now
the warnings in the front-end are toast notifications and in the
back-end they are Warning modals.
Part of: https://github.com/odoo/odoo/pull/35209
Diffstat (limited to 'addons/web/static/src/js/public/public_crash_manager.js')
| -rw-r--r-- | addons/web/static/src/js/public/public_crash_manager.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/addons/web/static/src/js/public/public_crash_manager.js b/addons/web/static/src/js/public/public_crash_manager.js new file mode 100644 index 00000000000..450753e51ad --- /dev/null +++ b/addons/web/static/src/js/public/public_crash_manager.js @@ -0,0 +1,33 @@ +odoo.define('web.PublicCrashManager', function (require) { +"use strict"; + +const core = require('web.core'); +const CrashManager = require('web.CrashManager').CrashManager; + +const PublicCrashManager = CrashManager.extend({ + + //-------------------------------------------------------------------------- + // Private + //-------------------------------------------------------------------------- + + /** + * @override + */ + _displayWarning(message, title, subtitle, options) { + this.displayNotification({ + ...options, + title, + message, + subtitle, + sticky: true, + }); + }, +}); + +core.serviceRegistry.add('crash_manager', PublicCrashManager); + +return { + CrashManager: PublicCrashManager, +}; + +}); |
