diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-06-06 10:47:53 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-06-06 10:47:53 +0200 |
| commit | 116826e02d655bdfef5d208a075acbaf56f1dcb8 (patch) | |
| tree | 74c68a7f247b4b08fe366d91e8f8cba2f0760520 /addons/web/static/src/js/views/basic | |
| parent | 120c93acbe3b8edf8496cd559edb8ae26943f79f (diff) | |
| parent | e7aff3775fbc9559765601cb7b7a0a3b7f06d7ed (diff) | |
[MERGE] forward port branch 11.0 up to e7aff3775fb
Diffstat (limited to 'addons/web/static/src/js/views/basic')
| -rw-r--r-- | addons/web/static/src/js/views/basic/basic_model.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_model.js b/addons/web/static/src/js/views/basic/basic_model.js index e3fb780bc52..bd06643194d 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -1973,9 +1973,7 @@ var BasicModel = AbstractModel.extend({ var records = []; var ids = []; list = this._applyX2ManyOperations(list); - if (_.isEmpty(list.data)) { - return $.when(); - } + _.each(list.data, function (localId) { var record = self.localData[localId]; var data = record._changes || record.data; @@ -1986,6 +1984,9 @@ var BasicModel = AbstractModel.extend({ ids.push(many2oneRecord.res_id); model = many2oneRecord.model; }); + if (!ids.length) { + return $.when(); + } return this._rpc({ model: model, method: 'name_get', |
