diff options
| author | Dhruv Patel <dhp@odoo.com> | 2020-05-05 12:35:29 +0000 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2020-05-29 08:00:01 +0000 |
| commit | bf9890f98cbd9adceb369a25ddbcae4fbebeda9a (patch) | |
| tree | 22c4e4c94d5e4a322449d95391a03fc7b130f34f /addons | |
| parent | 042b4060bdbbda73f5e02c902a8ecf8ab7ef96cb (diff) | |
[FIX] web: force refresh on expired session popup button click
Currently, when the session expired then it generates the popup that
"Your odoo session expired. Please refresh the current page."
Now once you click on the "Ok" button only close the popup and user have to
manually do refresh the page.
with this commit, we have changed the text of the popup to
"Your odoo session expired. The current page is about to be refreshed." and
when user click on "Ok" button forcefully refresh the page.
Task : 2241744
closes odoo/odoo#50710
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/web/static/src/js/services/crash_manager.js | 13 |
1 files changed, 12 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 b653aaa1c8d..ea0927a9f28 100644 --- a/addons/web/static/src/js/services/crash_manager.js +++ b/addons/web/static/src/js/services/crash_manager.js @@ -354,7 +354,18 @@ core.crash_registry.add('odoo.exceptions.RedirectWarning', RedirectWarningHandle function session_expired(cm) { return { display: function () { - cm.show_warning({type: _t("Odoo Session Expired"), message: _t("Your Odoo session expired. Please refresh the current web page.")}); + const notif = { + type: _t("Odoo Session Expired"), + message: _t("Your Odoo session expired. The current page is about to be refreshed."), + }; + const options = { + buttons: [{ + text: _t("Ok"), + click: () => window.location.reload(true), + close: true + }], + }; + cm.show_warning(notif, options); } }; } |
