[FIX] Kanban: records fetched using "Show more" button can't be edited because their ids where not added to the dataset

bzr revid: fme@openerp.com-20121108140201-nah05a0bxogv0iqj
This commit is contained in:
Fabien Meghazi 2012-11-08 15:02:01 +01:00
parent 82ab87af5c
commit d34b08d1bf
1 changed files with 8 additions and 2 deletions

View File

@ -638,10 +638,16 @@ instance.web_kanban.KanbanGroup = instance.web.Widget.extend({
},
do_show_more: function(evt) {
var self = this;
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,
'offset': self.dataset_offset += self.view.limit
}).done(this.do_add_records);
}).then(function(records) {
records.forEach(function(r) {
self.view.dataset.ids.push(r.id);
});
self.do_add_records(records);
return records;
});
},
do_add_records: function(records, prepend) {
var self = this;