[FIX] web_kanban: display all items of a selection field

If field.type === "selection" then group.attributes.value is an Array
and s[0] could never be equal to group.attributes.value
This commit is contained in:
Goffin Simon
2015-10-06 13:39:08 +02:00
parent e047130314
commit 595a33a2b1
@@ -219,7 +219,7 @@ var KanbanView = View.extend({
group.id = value instanceof Array ? value[0] : value;
var field = self.fields_view.fields[self.group_by_field];
if (field && field.type === "selection") {
value= _.find(field.selection, function (s) { return s[0] === group.attributes.value; });
value= _.find(field.selection, function (s) { return s[0] === group.id; });
}
group.title = (value instanceof Array ? value[1] : value) || _t("Undefined");
group.values = {};