summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorRomainLibert <rli@odoo.com>2018-08-01 10:42:44 +0200
committerRomainLibert <rli@odoo.com>2018-08-01 11:20:04 +0200
commit7ffb21c40be4ad7adc92c19e91b9964b53070b33 (patch)
tree024abc293826d03ac596c154dea348bafe22b365 /addons/web/static/src/js
parent00468e5f96a47e1a0e017723f62448a73d36de7e (diff)
parentcf7518f1fe9ed822d0acb055c0a52e0391b2ca5b (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')
-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];