From 14bd6dd277bd5d70a716a7723290de45d76b03ab Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 27 Sep 2017 16:12:36 +0200 Subject: [PATCH] [FIX] web: traceback on line graphs with only one data Graph tooltip destruction was fixed with commit https://github.com/odoo/odoo/commit/86252428846607cd5f4b18cef8de49a8cd0b151a#diff-5de06eee7a2eeae066aa1348a1528fe9L100. Unfortunately, the commit supposed that the 'display_' methods always returned a graph, which is wrong. opw-773759 --- addons/web/static/src/js/views/graph_widget.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/views/graph_widget.js b/addons/web/static/src/js/views/graph_widget.js index 73b9c6be406..8e6a574a35d 100644 --- a/addons/web/static/src/js/views/graph_widget.js +++ b/addons/web/static/src/js/views/graph_widget.js @@ -98,7 +98,9 @@ return Widget.extend({ })); } else { var chart = this['display_' + this.mode](); - chart.tooltip.chartContainer(this.$el[0]); + if (chart) { + chart.tooltip.chartContainer(this.$el[0]); + } } }, display_bar: function () {