From b39affc4962030158e826713e481d95442393061 Mon Sep 17 00:00:00 2001 From: Mathieu Duckerts-Antoine Date: Thu, 5 Sep 2019 11:50:49 +0000 Subject: [PATCH] [FIX] web: click on an embedded pivot view cell does not causes a crash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The custom event 'open_view' triggered by the pivot renderer was not stopped in the pivot controller. This used to cause a crash because the dashboard controller also listens to a custom event with the same name but following another logic. The present fix simply stop the propagaton of the event. A test has been added in the module web_dashboard. closes odoo/odoo#36466 Signed-off-by: Géry Debongnie (ged) --- addons/web/static/src/js/views/pivot/pivot_controller.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/src/js/views/pivot/pivot_controller.js b/addons/web/static/src/js/views/pivot/pivot_controller.js index 998d6ccc22c..47eb5ad49fe 100644 --- a/addons/web/static/src/js/views/pivot/pivot_controller.js +++ b/addons/web/static/src/js/views/pivot/pivot_controller.js @@ -340,6 +340,7 @@ var PivotController = AbstractController.extend({ * @param {OdooEvent} ev */ _onOpenView: function (ev) { + ev.stopPropagation(); var context = ev.data.context; var group = ev.data.group; var domain = this.model._getGroupDomain(group);