diff options
| author | Olivier Dony <odo@openerp.com> | 2014-02-17 11:28:06 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2014-02-17 11:28:06 +0100 |
| commit | 15a1aef33cb107d153d10ec04a5c5770b1aa3be2 (patch) | |
| tree | 106eb94c6b5b6ac7f2fc39ffb36192884feb01a4 /addons/web/static/src/js/data.js | |
| parent | 0227d6a05610e8aeb091dd9e6112a95fff347207 (diff) | |
| parent | acb010a9852755668bbe3f2419ae5038683f4a93 (diff) | |
[MERGE] Forward-port of latest saas-2 bugfixes, up to rev. 3901 dle@openerp.com-20140214114445-krexrwm9o2nrxepk
The following fixes have intentionally been reverted,
as the code has significantly changed and the bugs cannot
be reproduced:
- web_calendar fix (revid:dle@openerp.com-20140214114258-0hcsfdwyl61gph0v)
- CSS fix for buttons (revid:mat@openerp.com-20140213145755-txvtwqbfc83vnw9o)
bzr revid: odo@openerp.com-20140217102806-qg6kwk2jomdvvmlj
Diffstat (limited to 'addons/web/static/src/js/data.js')
| -rw-r--r-- | addons/web/static/src/js/data.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js index 78e3001d746..f2a55bbc44b 100644 --- a/addons/web/static/src/js/data.js +++ b/addons/web/static/src/js/data.js @@ -872,7 +872,8 @@ instance.web.BufferedDataSet = instance.web.DataSetStatic.extend({ }); var return_records = function() { var records = _.map(ids, function(id) { - return _.extend({}, _.detect(self.cache, function(c) {return c.id === id;}).values, {"id": id}); + var c = _.find(self.cache, function(c) {return c.id === id;}); + return _.isUndefined(c) ? c : _.extend({}, c.values, {"id": id}); }); if (self.debug_mode) { if (_.include(records, undefined)) { |
