diff options
| author | fja-odoo <fja@odoo.com> | 2019-06-11 12:26:57 +0000 |
|---|---|---|
| committer | fja-odoo <fja@odoo.com> | 2019-06-28 08:53:53 +0000 |
| commit | 283f8fed6e85f2df0386de46138129b4cadc52d7 (patch) | |
| tree | 296f46e0038125cf3b6a2e17b0c8d889f8c8dcac /addons/web/static/src/js/chrome | |
| parent | 0d1407a715901ea06e9a7211c0e3dbe09fadb785 (diff) | |
[IMP] web, *: display rpc warnings with toasts
* = test_website, partner_autocomplete
- All the rpc warnings are now displayed using the notification system
of https://github.com/odoo/odoo/commit/b94395b50175925fc7d1bd3655e5facb78a8ba2b
- test_website is up to date
Part of https://github.com/odoo/odoo/pull/32132
task-1894820
Diffstat (limited to 'addons/web/static/src/js/chrome')
| -rw-r--r-- | addons/web/static/src/js/chrome/abstract_web_client.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js index 270f2871afe..2d94501deed 100644 --- a/addons/web/static/src/js/chrome/abstract_web_client.js +++ b/addons/web/static/src/js/chrome/abstract_web_client.js @@ -331,7 +331,7 @@ var AbstractWebClient = Widget.extend(ServiceProviderMixin, KeyboardNavigationMi * @private */ _onConnectionLost: function () { - this.connectionNotificationID = this.call('notification', 'notify', { + this.connectionNotificationID = this.displayNotification({ title: _t('Connection lost'), message: _t('Trying to reconnect...'), sticky: true @@ -345,7 +345,8 @@ var AbstractWebClient = Widget.extend(ServiceProviderMixin, KeyboardNavigationMi _onConnectionRestored: function () { if (this.connectionNotificationID) { this.call('notification', 'close', this.connectionNotificationID); - this.call('notification', 'notify', { + this.displayNotification({ + type: 'info', title: _t('Connection restored'), message: _t('You are back online'), sticky: false |
