[FIX] id fetching for deletion signal in list views

bzr revid: xmo@openerp.com-20110412082028-c3yfg1ay14xcrmfh
This commit is contained in:
Xavier Morel 2011-04-12 10:20:28 +02:00
parent 40f26b7327
commit 5d7dae6e6f
1 changed files with 2 additions and 2 deletions

View File

@ -204,7 +204,7 @@ openerp.base.ListView = openerp.base.Controller.extend(
// don't link to forms
e.stopImmediatePropagation();
this.dataset.unlink(
[this.rows[$(e.currentTarget).closest('tr').prevAll().length].id]);
[this.rows[$(e.currentTarget).closest('tr').prevAll().length].data.id.value]);
},
/**
* Handles deletion of all selected lines
@ -226,7 +226,7 @@ openerp.base.ListView = openerp.base.Controller.extend(
var rows = this.rows;
return this.$element.find('th.oe-record-selector input:checked')
.closest('tr').map(function () {
return rows[$(this).prevAll().length].id;
return rows[$(this).prevAll().length].data.id.value;
}).get();
}
});