[FIX] web kanban: Remember all Ids dataset. For bug : click on Show More...(At Bottom of Kanban view). After, when you click on a record, it give : could not find id#x error.

bzr revid: chm@openerp.com-20121127083935-6tmbvee0ghuta00f
This commit is contained in:
Christophe Matthieu 2012-11-27 09:39:35 +01:00
parent e6d033755f
commit 7aeaabaa89
1 changed files with 2 additions and 3 deletions

View File

@ -642,13 +642,12 @@ instance.web_kanban.KanbanGroup = instance.web.Widget.extend({
},
do_show_more: function(evt) {
var self = this;
var ids = self.view.dataset.ids.splice(0);
return this.dataset.read_slice(this.view.fields_keys.concat(['__last_update']), {
'limit': self.view.limit,
'offset': self.dataset_offset += self.view.limit
}).then(function(records) {
records.forEach(function(r) {
self.view.dataset.ids.push(r.id);
});
self.view.dataset.ids = self.view.dataset.ids.concat(ids);
self.do_add_records(records);
return records;
});