[FIX] reload after install
authorAntony Lesuisse <al@openerp.com>
Fri, 15 Jun 2012 11:37:06 +0000 (13:37 +0200)
committerAntony Lesuisse <al@openerp.com>
Fri, 15 Jun 2012 11:37:06 +0000 (13:37 +0200)
lp bug: https://launchpad.net/bugs/1011536 fixed

bzr revid: al@openerp.com-20120615113706-ybb1nim66m3ft5c4

addons/web/static/src/js/coresetup.js

index 42d4456..9b40b62 100644 (file)
@@ -620,13 +620,18 @@ instance.web.Reload = instance.web.Widget.extend({
         this.menu_id = (params && params.menu_id) || false;
     },
     start: function() {
+        var l = window.location;
+        var timestamp = new Date().getTime();
+        var search = "?ts=" + timestamp;
+        if (l.search) {
+            search = l.search + "&ts=" + timestamp;
+        } 
+        var hash = l.hash;
         if (this.menu_id) {
-            // open the given menu id
-            var url_without_fragment = window.location.toString().split("#", 1)[0];
-            window.location = url_without_fragment + "#menu_id=" + this.menu_id;
-        } else {
-            window.location.reload();
+            hash = "#menu_id=" + this.menu_id;
         }
+        var url = l.protocol + "//" + l.host + l.pathname + search + hash;
+        window.location = url;
     }
 });