diff options
| author | Martin Geubelle <mge@odoo.com> | 2017-05-02 11:50:56 +0200 |
|---|---|---|
| committer | Martin Geubelle <mge@odoo.com> | 2017-05-04 11:58:25 +0200 |
| commit | c6a0ff52f9727b18f888d6bf8a16c6fdca88d021 (patch) | |
| tree | 5a105cee16c5648c7692ed0d03a8176b5bacec49 /addons/web/static/src/js | |
| parent | 34cf2bc51c77bc4ed13dd300d03572b0607434b3 (diff) | |
[FIX] web: Kanban: fallback on empty array for x2many raw_value
The commit e07f27d has wrongly changed the fallback for one2many raw_value from
an empty array to `false`. This modification brokes a lot of templates where we
assume that the value is always an array.
This commit restores the previous behavior with the fallback on [].
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/views/kanban/kanban_record.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/kanban/kanban_record.js b/addons/web/static/src/js/views/kanban/kanban_record.js index 5434ed7da72..c22a10ce6e6 100644 --- a/addons/web/static/src/js/views/kanban/kanban_record.js +++ b/addons/web/static/src/js/views/kanban/kanban_record.js @@ -368,7 +368,7 @@ var KanbanRecord = Widget.extend({ if ((r.type === 'date' || r.type === 'datetime') && value) { r.raw_value = value.toDate(); } else if (r.type === 'one2many' || r.type === 'many2many') { - r.raw_value = value.count ? value.res_ids : false; + r.raw_value = value.count ? value.res_ids : []; } else if (r.type === 'many2one' ) { r.raw_value = value && value.res_id || false; } else { |
