diff options
| author | Julien Mougenot <jum@odoo.com> | 2019-09-11 12:38:34 +0000 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2019-09-18 11:31:43 +0000 |
| commit | 4a3315fa2245cea287bf02e1eff2516e80ed62a9 (patch) | |
| tree | b4472737bbdb9fbdb3e2a8fedc5dcf960cfd1f1a /addons/web/static/src/js | |
| parent | 6ecf325769381b495ca53f102825c5dafe9b8712 (diff) | |
[FIX] web: list: multi edition only between selected records
Before this commit, if a record was selected and another one was edited,
it was considered as multi edition.
Now, the multi edition only works if the edited record is included in the
selection; else it will be the only edited record (single edition).
Task 2068280
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/views/list/list_editable_renderer.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/addons/web/static/src/js/views/list/list_editable_renderer.js b/addons/web/static/src/js/views/list/list_editable_renderer.js index d9cc1115917..1aec18f6fb7 100644 --- a/addons/web/static/src/js/views/list/list_editable_renderer.js +++ b/addons/web/static/src/js/views/list/list_editable_renderer.js @@ -339,9 +339,7 @@ ListRenderer.include({ * @returns {boolean} */ inMultipleRecordEdition: function (recordId) { - const record = this._getRecord(recordId) || {}; - const recordIds = [...new Set([recordId, ...this.selection])]; - return this.editable && recordIds.length > 1 && record.res_id; + return this.editable && this.selection.length > 1 && this.selection.includes(recordId); }, /** * Removes the line associated to the given recordID (the index of the row |
