summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views.js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2011-12-21 15:19:53 +0100
committerXavier Morel <xmo@openerp.com>2011-12-21 15:19:53 +0100
commit01fdd9420f2e22d9632f386ffc02257e4a9cfb5e (patch)
tree0d22c38b50f8ebfa1ba856849c6d09771a5ac65b /addons/web/static/src/js/views.js
parent1448318b2f2b4d6c0462edb51d61d0e2182dd9ff (diff)
[FIX] reload form (and list) views after sidebar actions
bzr revid: xmo@openerp.com-20111221141953-zovj4tpwse9tfvm9
Diffstat (limited to 'addons/web/static/src/js/views.js')
-rw-r--r--addons/web/static/src/js/views.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index e4a4668ae4a..072d4ae33c1 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -864,7 +864,10 @@ session.web.Sidebar = session.web.Widget.extend({
additional_context);
result.result.flags = result.result.flags || {};
result.result.flags.new_window = true;
- self.do_action(result.result);
+ self.do_action(result.result, function () {
+ // reload view
+ self.widget_parent.reload();
+ });
});
});
},
@@ -1188,7 +1191,14 @@ session.web.View = session.web.Widget.extend(/** @lends session.web.View# */{
on_sidebar_view_log: function() {
},
sidebar_context: function () {
- return $.Deferred().resolve({}).promise();
+ return $.when();
+ },
+ /**
+ * Asks the view to reload itself, if the reloading is asynchronous should
+ * return a {$.Deferred} indicating when the reloading is done.
+ */
+ reload: function () {
+ return $.when();
}
});