Hello, in many2many widget sometimes when you has more than 80 records, you select any records in first page and search more records, but the selected items are lost, i am working to dont lost this.
I found where code does this, hack some JS function but still dont know where runs add rows to widget.
My code[1] is running ok to dont lost selected items in SelectCreateListView.
Waiting for your help to pass selected_items and add to records.
Regards,
openerp.web.form.SelectCreateListView = openerp.web.ListView.extend({
init: function (parent, dataset, view_id, options) {
this.selected_items = [];
this._super(parent, dataset, view_id, options);
},
select_record: function(index) {
console.log('selecciono items '+index);
this.popup.on_select_elements([this.dataset.ids[index]]);
this.popup.stop();
},
do_select: function(ids, records) {
this._super(ids, records);
this.selected_items.push(ids[0]);
console.log('selected '+ids);
console.log('selected_items: '+this.selected_items);
this.popup.on_click_element(ids);
}
}); }