summaryrefslogtreecommitdiff
path: root/addons/board/static/src/js/dashboard.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/board/static/src/js/dashboard.js')
-rw-r--r--addons/board/static/src/js/dashboard.js20
1 files changed, 16 insertions, 4 deletions
diff --git a/addons/board/static/src/js/dashboard.js b/addons/board/static/src/js/dashboard.js
index 00b66c06312..e84529be83b 100644
--- a/addons/board/static/src/js/dashboard.js
+++ b/addons/board/static/src/js/dashboard.js
@@ -104,10 +104,9 @@ FormController.include({
},
/**
- * We need to intercept switch_view event coming from sub views, because
- * there is no view manager doing the job. Also, we don't actually want to
- * switch view in dashboard, we want to do a do_action (which will open the
- * record in a different breadcrumb)
+ * We need to intercept switch_view event coming from sub views, because we
+ * don't actually want to switch view in dashboard, we want to do a
+ * do_action (which will open the record in a different breadcrumb).
*
* @private
* @param {OdooEvent} event
@@ -126,6 +125,9 @@ FormController.include({
});
FormRenderer.include({
+ custom_events: _.extend({}, FormRenderer.prototype.custom_events, {
+ env_updated: '_onEnvUpdated',
+ }),
events: _.extend({}, FormRenderer.prototype.events, {
'click .oe_dashboard_column .oe_fold': '_onFoldClick',
'click .oe_dashboard_link_change_layout': '_onChangeLayout',
@@ -340,6 +342,16 @@ FormRenderer.include({
});
},
/**
+ * Stops the propagation of 'update_env' events triggered by the controllers
+ * instantiated by the dashboard.
+ *
+ * @override
+ * @private
+ */
+ _onEnvUpdated: function (event) {
+ event.stopPropagation();
+ },
+ /**
* @private
* @param {MouseEvent} event
*/