From 6538c67c2b9d32dc5e91351470d85d5e1c47980a Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 19 Aug 2015 17:05:21 +0200 Subject: [FIX] web: many2one try to read a creating record but the cache doesn't yet contain the record --- addons/web/static/src/js/framework/data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/framework') diff --git a/addons/web/static/src/js/framework/data.js b/addons/web/static/src/js/framework/data.js index c0c297fee09..9530486066d 100644 --- a/addons/web/static/src/js/framework/data.js +++ b/addons/web/static/src/js/framework/data.js @@ -911,7 +911,7 @@ var BufferedDataSet = DataSetStatic.extend({ var return_records = function() { var records = _.map(ids, function(id) { var cache = _.find(self.cache, function(cache) {return cache.id === id;}); - return _.extend({}, cache.values, {"id": id}, options.readonly_fields || {}); + return _.extend({}, cache && cache.values, {"id": id}, options.readonly_fields || {}); }); if (self.debug_mode) { if (_.include(records, undefined)) { -- cgit v1.2.3