Skip to content
Snippets Groups Projects
Commit 28a9336a authored by Joren Van Onder's avatar Joren Van Onder
Browse files

[FIX] barcodes: also allow barcodes triggering buttons in dropdowns

On smaller screens some buttons will be hidden. An example of this is
the 'Validate' button in the stock.picking form view. It is not :visible
but it should still be possible to trigger through scanning a
'O-BTN.validate' barcode.

opw-676741
parent 59982a04
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,8 @@ var ButtonBarcodeHandlerMixin = _.extend({}, BarcodeHandlerMixin, {
var self = this;
this.on_barcode_scanned = function(barcode) {
var match = barcode.match(/O-BTN\.(.+)/);
if (match && match[1] === self.node.attrs.barcode_trigger && self.$el.is(':visible')) {
if (match && match[1] === self.node.attrs.barcode_trigger &&
(self.$el.is(':visible') || self.$el.parent('.dropdown-menu'))) {
self.on_click();
}
};
......
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