summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-07-26 16:31:41 +0200
committerXavier Morel <xmo@openerp.com>2012-07-26 16:31:41 +0200
commit7ccf2ad2a5779dac1175c0191778ff9ee69eb7fb (patch)
tree7cc0dc14e6caba9aea036d1781241f497fb9ca37 /addons/web/static/src/js
parent18afaaa1c13c27145977d2b374814490230d6c09 (diff)
[FIX] if value may not be a promise, return the wrapped value if wrapping it anyway
bzr revid: xmo@openerp.com-20120726143141-4wbrqq29qqhvwhqw
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/views.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index ddf4050fa38..5af7e5bf616 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -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() {