diff options
| author | RomainLibert <rli@odoo.com> | 2018-08-01 10:42:44 +0200 |
|---|---|---|
| committer | RomainLibert <rli@odoo.com> | 2018-08-01 11:20:04 +0200 |
| commit | 7ffb21c40be4ad7adc92c19e91b9964b53070b33 (patch) | |
| tree | 024abc293826d03ac596c154dea348bafe22b365 /addons/web/static/src/js/views/graph/graph_model.js | |
| parent | 00468e5f96a47e1a0e017723f62448a73d36de7e (diff) | |
| parent | cf7518f1fe9ed822d0acb055c0a52e0391b2ca5b (diff) | |
[MERGE] stock,stock_picking: prepare stock_dashboard
This commit updates the demo data in order to have a beautiful dashboard
when using the standard demo data.
It also enables us to display false in a graph view when using a boolean
measure, previously this was considered an empty value, as many2one
fields use false to indicate that they are empty hence we were
displaying undefined instead of false.
Task #1844742
Closes #25944
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.js | 2 |
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]; |
