From ec5e8391295582eafe118d0c114768d4d973845f Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Thu, 3 May 2012 10:17:32 +0200 Subject: [PATCH] [ADD] client action to reload the interface (useful for refreshing the menus and current view) bzr revid: rco@openerp.com-20120503081732-ry9nj048tlh464z7 --- addons/web/static/src/js/views.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 798c5bb1493..ae1ec8fdc6e 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -1318,6 +1318,18 @@ instance.web.str_to_xml = function(s) { */ instance.web.client_actions = new instance.web.Registry(); +/** + * Client action to reload the whole interface; refreshes the menu and reloads the current view + */ +instance.web.client_actions.add("reload_all", "instance.web.ReloadAll"); + +instance.web.ReloadAll = instance.web.Widget.extend({ + template: "EmptyComponent", + start: function() { + window.location.reload(); + } +}); + /** * Registry for all the main views */