[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:
parent
e6d033755f
commit
7aeaabaa89
|
@ -642,13 +642,12 @@ instance.web_kanban.KanbanGroup = instance.web.Widget.extend({
|
||||||
},
|
},
|
||||||
do_show_more: function(evt) {
|
do_show_more: function(evt) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
var ids = self.view.dataset.ids.splice(0);
|
||||||
return this.dataset.read_slice(this.view.fields_keys.concat(['__last_update']), {
|
return this.dataset.read_slice(this.view.fields_keys.concat(['__last_update']), {
|
||||||
'limit': self.view.limit,
|
'limit': self.view.limit,
|
||||||
'offset': self.dataset_offset += self.view.limit
|
'offset': self.dataset_offset += self.view.limit
|
||||||
}).then(function(records) {
|
}).then(function(records) {
|
||||||
records.forEach(function(r) {
|
self.view.dataset.ids = self.view.dataset.ids.concat(ids);
|
||||||
self.view.dataset.ids.push(r.id);
|
|
||||||
});
|
|
||||||
self.do_add_records(records);
|
self.do_add_records(records);
|
||||||
return records;
|
return records;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue