projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2684b7d
)
[FIX] web_graph: pivot_table, use _.isEmpty to check if value_lookup is False
author
Denis Ledoux
<dle@odoo.com>
Thu, 11 Sep 2014 15:00:45 +0000
(17:00 +0200)
committer
Denis Ledoux
<dle@odoo.com>
Thu, 11 Sep 2014 15:00:45 +0000
(17:00 +0200)
addons/web_graph/static/src/js/pivot_table.js
patch
|
blob
|
history
diff --git
a/addons/web_graph/static/src/js/pivot_table.js
b/addons/web_graph/static/src/js/pivot_table.js
index
770519e
..
7de629a
100644
(file)
--- a/
addons/web_graph/static/src/js/pivot_table.js
+++ b/
addons/web_graph/static/src/js/pivot_table.js
@@
-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];
}