[FIX] if value may not be a promise, return the wrapped value if wrapping it anyway
bzr revid: xmo@openerp.com-20120726143141-4wbrqq29qqhvwhqw
This commit is contained in:
parent
18afaaa1c1
commit
7ccf2ad2a5
|
@ -396,7 +396,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
|||
.find('.oe_view_manager_switch a').filter('[data-view-type="' + view_type + '"]')
|
||||
.parent().addClass('active');
|
||||
|
||||
$.when(view_promise).then(function () {
|
||||
return $.when(view_promise).then(function () {
|
||||
_.each(_.keys(self.views), function(view_name) {
|
||||
var controller = self.views[view_name].controller;
|
||||
if (controller) {
|
||||
|
@ -418,7 +418,6 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
|||
}
|
||||
});
|
||||
});
|
||||
return view_promise;
|
||||
},
|
||||
do_create_view: function(view_type) {
|
||||
// Lazy loading of views
|
||||
|
@ -1129,7 +1128,7 @@ instance.web.View = instance.web.Widget.extend({
|
|||
this.view_id = view_id;
|
||||
this.set_default_options(options);
|
||||
},
|
||||
start: function() {
|
||||
start: function () {
|
||||
return this.load_view();
|
||||
},
|
||||
load_view: function() {
|
||||
|
|
Loading…
Reference in New Issue