diff options
| author | Aaron Bohy <aab@odoo.com> | 2020-03-27 09:56:50 +0000 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2020-03-30 09:55:08 +0000 |
| commit | 8608a5ed8dc7d14432556d2c4c469e3f8deda7f1 (patch) | |
| tree | ef67e9f8e56c5d7feccb0a722088a3d196d3be0e /addons/web/static/src/js/views/form | |
| parent | 9755e8875bf8bae1881db38d3a0ec99d98d572a8 (diff) | |
[IMP] web: adapt (un)archive feature to list selection changes
Following the new selection feature in list views, this commit
adapts the archive and unarchive actions.
Part of task 2185145
Diffstat (limited to 'addons/web/static/src/js/views/form')
| -rw-r--r-- | addons/web/static/src/js/views/form/form_controller.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/form/form_controller.js b/addons/web/static/src/js/views/form/form_controller.js index 8af47e4cd4f..7147f7aee66 100644 --- a/addons/web/static/src/js/views/form/form_controller.js +++ b/addons/web/static/src/js/views/form/form_controller.js @@ -652,7 +652,6 @@ var FormController = BasicController.extend({ */ _onSave: function (ev) { ev.stopPropagation(); // Prevent x2m lines to be auto-saved - var self = this; this._disableButtons(); this.saveRecord().then(this._enableButtons.bind(this)).guardedCatch(this._enableButtons.bind(this)); }, @@ -679,7 +678,8 @@ var FormController = BasicController.extend({ * @param {boolean} archive */ _toggleArchiveState: function (archive) { - this._archive([this.handle], archive); + const resIds = this.model.localIdsToResIds([this.handle]); + this._archive(resIds, archive); }, }); |
