[FIX] removal of id-less records from list view
bzr revid: xmo@openerp.com-20120703091257-3dw0qs9aw125hrc7
This commit is contained in:
parent
29e65ff052
commit
4aa64c0033
|
@ -905,8 +905,13 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
|
|||
|
||||
this.record_callbacks = {
|
||||
'remove': function (event, record) {
|
||||
var $row = self.$current.children(
|
||||
var $row;
|
||||
if (!record.get('id')) {
|
||||
$row = self.$current.children(':not([data-id])');
|
||||
} else {
|
||||
$row = self.$current.children(
|
||||
'[data-id=' + record.get('id') + ']');
|
||||
}
|
||||
var index = $row.data('index');
|
||||
$row.remove();
|
||||
self.refresh_zebra(index);
|
||||
|
|
Loading…
Reference in New Issue