[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-09 19:21:21 +01:00 committed by Xavier Morel
parent eeffda9689
commit c2abdbbc37
1 changed files with 1 additions and 1 deletions

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)