[IMP] Confirm delete

bzr revid: fme@openerp.com-20111103105518-siu6qoo1qho0qddz
This commit is contained in:
Fabien Meghazi
2011-11-03 11:55:18 +01:00
parent 584edbaa81
commit 794764a58d
+6 -4
View File
@@ -286,10 +286,12 @@ openerp.web_kanban.KanbanRecord = openerp.web.Widget.extend({
},
do_action_delete: function($action) {
var self = this;
return $.when(this.view.dataset.unlink([this.id])).then(function() {
self.group.remove_record(self.id)
self.stop();
});
if (confirm(_t("Qre you sure you want to delete this record ?"))) {
return $.when(this.view.dataset.unlink([this.id])).then(function() {
self.group.remove_record(self.id)
self.stop();
});
}
},
do_action_edit: function($action) {
var self = this;