Skip to content
Snippets Groups Projects
Commit 6647e1f8 authored by Simon Lejeune's avatar Simon Lejeune
Browse files

[FIX] barcodes: correctly unbind quantity event listener

The quantity event handler is not correctly unbound when its action
is deleted, resulting in multiple window.prompt asking the quantity
of the products if you go mulitple times trough a view when a widget
implementing the barcode thing is used.

There seems to be a bug in the framework ("barcode_scanned" events
are registered the same way than the "keypress" one on core.bus
but they don't have suffer from the same issue).
parent 5e6df428
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,11 @@ var FormViewBarcodeHandler = common.AbstractField.extend(BarcodeHandlerMixin, {
}
},
destroy: function () {
this.stop_listening();
this._super.apply(this, arguments);
},
_display_no_edit_mode_warning: function() {
this.do_warn(_t('Error : Document not editable'), _t('To modify this document, please first start edition.'));
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment