[imp] unbind barcode reader events when closing point of sale

bzr revid: rlo@openerp.com-20120321100414-h5qsu1qumbil8uks
This commit is contained in:
Roberto López López (OpenERP)
2012-03-21 11:04:14 +01:00
parent 2f0d87381b
commit 1677026b0b
@@ -1403,6 +1403,9 @@ openerp.point_of_sale = function(db) {
}, this));
},
close: function() {
// remove barcode reader event listener
$('body').undelegate('', 'keyup')
return new db.web.Model("ir.model.data").get_func("search_read")([['name', '=', 'action_pos_close_statement']], ['res_id']).pipe(
_.bind(function(res) {
return this.rpc('/web/action/load', {'action_id': res[0]['res_id']}).pipe(_.bind(function(result) {