summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/graph/graph_model.js
diff options
context:
space:
mode:
authorRomainLibert <rli@odoo.com>2018-07-24 13:23:50 +0200
committerRomainLibert <rli@odoo.com>2018-08-01 11:20:03 +0200
commitcf7518f1fe9ed822d0acb055c0a52e0391b2ca5b (patch)
tree024abc293826d03ac596c154dea348bafe22b365 /addons/web/static/src/js/views/graph/graph_model.js
parent76715e7871ba091dbd0a62d42cdf1a0dfda3405a (diff)
[IMP] web: use true and false as values for boolean group by
In the graph view, by default the value false was considered to be a non set value (which is the case when dealing with M2O fields). But in the case of boolean fields, we want to display the value false.
Diffstat (limited to 'addons/web/static/src/js/views/graph/graph_model.js')
-rw-r--r--addons/web/static/src/js/views/graph/graph_model.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/graph/graph_model.js b/addons/web/static/src/js/views/graph/graph_model.js
index dd7d0efa28f..eb831d5047a 100644
--- a/addons/web/static/src/js/views/graph/graph_model.js
+++ b/addons/web/static/src/js/views/graph/graph_model.js
@@ -202,7 +202,7 @@ return AbstractModel.extend({
* @returns {string}
*/
_sanitizeValue: function (value, field) {
- if (value === false) return _t("Undefined");
+ if (value === false && this.fields[field].type !== 'boolean') return _t("Undefined");
if (value instanceof Array) return value[1];
if (field && this.fields[field] && (this.fields[field].type === 'selection')) {
var selected = _.where(this.fields[field].selection, {0: value})[0];