[FIX] actually fix race condition on listview init: incorrect on_mode_switch override...
authorXavier Morel <xmo@openerp.com>
Thu, 25 Aug 2011 08:22:21 +0000 (10:22 +0200)
committerXavier Morel <xmo@openerp.com>
Thu, 25 Aug 2011 08:22:21 +0000 (10:22 +0200)
bzr revid: xmo@openerp.com-20110825082221-tasmo3je0wu4iw6h

addons/base/static/src/js/views.js

index c678215..7f6d78d 100644 (file)
@@ -325,8 +325,9 @@ openerp.base.ViewManagerAction = openerp.base.ViewManager.extend({
         }
     },
     on_mode_switch: function (view_type) {
-        this._super(view_type);
-        this.shortcut_check(this.views[view_type]);
+        return $.when(
+            this._super(view_type),
+            this.shortcut_check(this.views[view_type]));
     },
     shortcut_check : function(view) {
         var self = this;