diff options
| author | Pierre Masereel <pim@odoo.com> | 2017-04-13 16:38:13 +0200 |
|---|---|---|
| committer | Pierre Masereel <pim@odoo.com> | 2017-04-14 10:50:35 +0200 |
| commit | ff2ce7524b9305cc2a7f4a73a0abc744f18ec422 (patch) | |
| tree | 533780e844ddb6db65badb1b2e24f399326fc1f1 /addons/web/static/src | |
| parent | 2f67881d4517b786f08a84242f0dcb3c1c8ece57 (diff) | |
[FIX] web: archive kanban column
When we try to archive a kanban column we get a traceback when the field
'active' exists on the model but not in the view.
This traceback is caused by an unecessary check of the active value of
the record.
To fix it, we apply the 'active' value on all records, and not only on
the ones where active value changed.
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/views/kanban/kanban_controller.js | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/addons/web/static/src/js/views/kanban/kanban_controller.js b/addons/web/static/src/js/views/kanban/kanban_controller.js index ab0f4cb6d07..023e013301e 100644 --- a/addons/web/static/src/js/views/kanban/kanban_controller.js +++ b/addons/web/static/src/js/views/kanban/kanban_controller.js @@ -182,12 +182,7 @@ var KanbanController = BasicController.extend({ var self = this; var active_value = !event.data.archive; var column = event.target; - var record_ids = []; - _.each(column.records, function (kanban_record) { - if (kanban_record.record.active.value !== active_value) { - record_ids.push(kanban_record.db_id); - } - }); + var record_ids = _.pluck(column.records, 'db_id'); if (record_ids.length) { this.model .toggleActive(record_ids, active_value, column.db_id) |
