[FIX] web_graph: pivot_table, use _.isEmpty to check if value_lookup is False

This commit is contained in:
Denis Ledoux 2014-09-11 17:00:45 +02:00
parent 2684b7de4c
commit 3911468d72
1 changed files with 1 additions and 1 deletions

View File

@ -404,7 +404,7 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({
} else if (grouped_on && this.fields[grouped_on].type === 'selection') {
var selection = this.fields[grouped_on].selection,
value_lookup = _.where(selection, {0:value});
group.attributes.value = value_lookup ? value_lookup[0][1] : _t('Undefined');
group.attributes.value = !_.isEmpty(value_lookup) ? value_lookup[0][1] : _t('Undefined');
} else if (value instanceof Array) {
group.attributes.value = value[1];
}