From 154533ee097635e05e60a0a16590d73256671dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Tue, 4 Nov 2014 11:35:45 +0100 Subject: [PATCH] [FIX] readd get_view_id to viewmanager (webclient) it was removed in the refactoring of the action/viewmanager, but somehow was not readded. This is now done, and should prevent a few crashes. --- addons/web/static/src/js/views.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 3c161190334..1dc3d6b461c 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -738,6 +738,12 @@ instance.web.ViewManager = instance.web.Widget.extend({ this.view_stack.splice(index); return this.switch_mode(view_type); }, + /** + * @returns {Number|Boolean} the view id of the given type, false if not found + */ + get_view_id: function(view_type) { + return this.views[view_type] && this.views[view_type].view_id || false; + }, /** * Sets up the current viewmanager's search view. *