diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-01-04 19:43:24 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-01-04 19:43:24 +0100 |
| commit | ca475e08ebfec9c6526b84087660a8dcc363dfe8 (patch) | |
| tree | d8f83033052ffa935615a4fd77e7184a71164b08 /addons/web/static/src/js | |
| parent | 3d04e44880fb77812e65342ef25bb8ad06094ddc (diff) | |
| parent | 799e7f7740682d9f7610a14b9544b98952b2f75c (diff) | |
[MERGE] forward port branch 10.0 up to 799e7f77406
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/views/graph_widget.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/graph_widget.js b/addons/web/static/src/js/views/graph_widget.js index 64ba42b1928..e67d12bcc18 100644 --- a/addons/web/static/src/js/views/graph_widget.js +++ b/addons/web/static/src/js/views/graph_widget.js @@ -205,18 +205,20 @@ return Widget.extend({ all_zero = all_zero && (datapt.value === 0); }); if (some_negative && !all_negative) { - return this.$el.append(QWeb.render('GraphView.error', { + this.$el.append(QWeb.render('GraphView.error', { title: _t("Invalid data"), description: _t("Pie chart cannot mix positive and negative numbers. " + "Try to change your domain to only display positive results"), })); + return; } if (all_zero) { - return this.$el.append(QWeb.render('GraphView.error', { + this.$el.append(QWeb.render('GraphView.error', { title: _t("Invalid data"), description: _t("Pie chart cannot display all zero numbers.. " + "Try to change your domain to display positive results"), })); + return; } if (this.groupbys.length) { data = this.data.map(function (datapt) { |
