[FIX] reset records on a group apoptosis, cleanout proxies when reseting a Collection

bzr revid: xmo@openerp.com-20110818132747-xnsgcugx1nohc7p8
This commit is contained in:
Xavier Morel 2011-08-18 15:27:47 +02:00
parent 92e06c997b
commit 941d1d0968
1 changed files with 2 additions and 0 deletions

View File

@ -1119,6 +1119,7 @@ openerp.base.ListView.Groups = openerp.base.Class.extend( /** @lends openerp.bas
});
this.children = {};
$(this.elements).remove();
this.records.reset();
return this;
},
get_records: function () {
@ -1339,6 +1340,7 @@ var Collection = openerp.base.Class.extend(/** @lends Collection# */{
_(this._proxies).each(function (proxy) {
proxy.reset();
});
this._proxies = {};
this.length = 0;
this.records = [];
this._byId = {};