summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/pivot/pivot_controller.js
diff options
context:
space:
mode:
authorMathieu Duckerts-Antoine <dam@odoo.com>2020-08-11 15:16:32 +0000
committerMathieu Duckerts-Antoine <dam@odoo.com>2020-08-14 07:52:49 +0000
commit3da3ae11783c9ed6bc0634e07089f62ad05c75cb (patch)
treee1a5202253b17349ba30a50b38fb3ef7838584fa /addons/web/static/src/js/views/pivot/pivot_controller.js
parenta137f22363ff538ab86f50d15851730af1b8ed76 (diff)
[FIX] web: pivot: avoid to toggle invalid measure
Before this commit, click on the divider in the menu 'Measures' of the pivot control panel would cause a crash. The present commit fixes that situation. We also bring another small correction: the menu won't close if one clicks on the measure list but not exactly on a menu item or the divider. closes odoo/odoo#55902 X-original-commit: aad9f3fd7499ef8b660cc25fea840a34d70f75a6 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com> Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/pivot/pivot_controller.js')
-rw-r--r--addons/web/static/src/js/views/pivot/pivot_controller.js2
1 files changed, 1 insertions, 1 deletions
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 723d52aa25c..1138778156a 100644
--- a/addons/web/static/src/js/views/pivot/pivot_controller.js
+++ b/addons/web/static/src/js/views/pivot/pivot_controller.js
@@ -173,7 +173,7 @@ odoo.define('web.PivotController', function (require) {
if (ev.target.closest('.o_pivot_measures_list')) {
ev.preventDefault();
ev.stopPropagation();
- const field = $target.data('field');
+ const field = ev.target.dataset.field;
if (field) {
this.update({ measure: field });
}