[MERGE] forward port of branch 7.0 up to 767d2ea9a6

This commit is contained in:
Denis Ledoux 2014-07-29 11:35:19 +02:00
parent 6b1a804b29
commit bbb8d8f25a
1 changed files with 2 additions and 2 deletions

View File

@ -694,8 +694,8 @@ instance.web.ViewManager = instance.web.Widget.extend({
var container = this.$el.find("> .oe_view_manager_body > .oe_view_manager_view_" + view_type);
var view_promise = controller.appendTo(container);
this.views[view_type].controller = controller;
this.views[view_type].deferred.resolve(view_type);
return $.when(view_promise).done(function() {
self.views[view_type].deferred.resolve(view_type);
if (self.searchview
&& self.flags.auto_search
&& view.controller.searchable !== false) {
@ -1109,7 +1109,7 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
);
}
$.when(defs).done(function() {
$.when(this.views[this.active_view] ? this.views[this.active_view].deferred : $.when(), defs).done(function() {
self.views[self.active_view].controller.do_load_state(state, warm);
});
},