[FIX] web_kanban: correctly sets id in some cases

for some fields, the value is an array with the value and a description. In that
case, we need to only take the value in account to set the id of the group.
This commit is contained in:
Géry Debongnie
2015-08-19 15:33:25 +02:00
parent aefb17b124
commit 256e5bd23a
@@ -215,7 +215,7 @@ var KanbanView = View.extend({
} else {
_.each(groups, function (group) {
var value = group.attributes.value;
group.id = value;
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; });