odoo-13.0/addons/web/static/src/js/core/misc.js
/**
 * Redirect to url by replacing window.location
 * If wait is true, sleep 1s and wait for the server i.e. after a restart.
 */
Redirect to url by replacing window.location
If wait is true, sleep 1s and wait for the server i.e. after a restart.
Redirect to url by replacing window . location If wait is true sleep 1s and wait for the server i . e . after a restart .
function redirect (url, wait) {
    disableCrashManager();
    var load = function() {
        var old = "" + window.location;
        var old_no_hash = old.split("#")[0];
        var url_no_hash = url.split("#")[0];
        location.assign(url);
        if (old_no_hash === url_no_hash) {
            location.reload(true);
        }
    };
    var wait_server = function() {
        ajax.rpc("/web/webclient/version_info", {}).then(load).guardedCatch(function () {
            setTimeout(wait_server, 250);
        });
    };
    if (wait) {
        setTimeout(wait_server, 1000);
    } else {
        load();
    }
}
function redirect ( url , wait ) { disableCrashManager ( ) ; var load = function ( ) { var old = "" + window . location ; var old_no_hash = old . split ( "#" ) [ 0 ] ; var url_no_hash = url . split ( "#" ) [ 0 ] ; location . assign ( url ) ; if ( old_no_hash === url_no_hash ) { location . reload ( true ) ; } } ; var wait_server = function ( ) { ajax . rpc ( "/web/webclient/version_info" , { } ) . then ( load ) . guardedCatch ( function ( ) { setTimeout ( wait_server , 250 ) ; } ) ; } ; if ( wait ) { setTimeout ( wait_server , 1000 ) ; } else { load ( ) ; } }
Redirect to url by replacing window.location
 If wait is true, sleep 1s and wait for the server i.e.
Redirect to url by replacing window . location If wait is true sleep 1s and wait for the server i . e .
// Dont display a dialog if some xmlhttprequest are in progress