[IMP] Make many2many widgets in listview usable for one2many

Existings many2many widgets in ListView can be used also for one2many if
the supplementary data is provided for the column.

closes #11282
This commit is contained in:
Peter Hahn
2016-03-25 16:54:32 +01:00
committed by Xavier Morel
parent eeffda9689
commit c2abdbbc37
+1 -1
View File
@@ -1100,7 +1100,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
record.set(column.id, names[0]);
});
}
} else if (column.type === 'many2many') {
} else if (column.type === 'many2many' || column.type === 'one2many') {
value = record.get(column.id);
// non-resolved (string) m2m values are arrays
if (value instanceof Array && !_.isEmpty(value)