diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-11-25 16:18:10 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-11-25 16:18:10 +0100 |
| commit | d4906307459f3c67270d6461a7db2367cc24cd20 (patch) | |
| tree | e0bfd33e7afe2634de8228ed68027bdf2fcc10b6 /addons/web/static/src/js/framework/data.js | |
| parent | 0ff9a1c34a8019081c1fb2d5f97c984b9c6a1b99 (diff) | |
| parent | b2939537d97624122bddfecaadb2490d2f4c477c (diff) | |
[MERGE] forward port of branch 9.0 up to b293953
Diffstat (limited to 'addons/web/static/src/js/framework/data.js')
| -rw-r--r-- | addons/web/static/src/js/framework/data.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/web/static/src/js/framework/data.js b/addons/web/static/src/js/framework/data.js index 8dd34cd4b93..e92bbd98c53 100644 --- a/addons/web/static/src/js/framework/data.js +++ b/addons/web/static/src/js/framework/data.js @@ -761,6 +761,12 @@ var BufferedDataSet = DataSetStatic.extend({ _.extend(cached.from_read, options.from_read); _.extend(cached.changes, options.changes); _.extend(cached.readonly_fields, options.readonly_fields); + // discard values from cached.changes that are in cached.from_read + _.each(cached.changes, function (v, k) { + if (cached.from_read[k] === v) { + delete cached.changes[k]; + } + }); if (options.to_create !== undefined) cached.to_create = options.to_create; if (options.to_delete !== undefined) cached.to_delete = options.to_delete; } |
