diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-08-17 16:17:08 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2015-08-17 16:17:22 +0200 |
| commit | 03e982b93ff87f7fbb291152b1fab0b555a9dd87 (patch) | |
| tree | 7a2c7ce991ddbc1d792c23d9fb0da6bf56b64c9a | |
| parent | 7a6e94edd83e9e73e56d2d148e3238618195cf9f (diff) | |
[FIX] web: need to initialize values into the cache
| -rw-r--r-- | addons/web/static/src/js/framework/data.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web/static/src/js/framework/data.js b/addons/web/static/src/js/framework/data.js index d44bcb79f15..c0c297fee09 100644 --- a/addons/web/static/src/js/framework/data.js +++ b/addons/web/static/src/js/framework/data.js @@ -745,7 +745,7 @@ var BufferedDataSet = DataSetStatic.extend({ // this.from_readonly. var cached = _.detect(this.cache, function(x) {return x.id === id;}); if (!cached) { - this.cache.push(cached = {id: id}); + this.cache.push(cached = {id: id, values: {}}); } var record = _.detect(this.from_read, function(x) {return x.id === id;}); if (record) { @@ -831,6 +831,9 @@ var BufferedDataSet = DataSetStatic.extend({ } var record_from_read = _.detect(self.from_read, function(x) {return x.id === id;}); + if (!record_from_read) { + record_from_read = {values: {}}; + } _.each(data, function (v, k) { if (!_.isEqual(v, cached.values[k])) { dirty = true; |
