From 8fb25e185bb2e78ce7864205b4338022b2f44909 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Tue, 28 Nov 2017 14:42:00 +0100 Subject: [PATCH] [FIX] barcodes: manage several barcode widgets related to rev 0d19ee989d1d890860adaf360de204eb543136a5 It was broken following the refactoring done in saas16, resulting in barcodes being handled on all the displayed forms and it was problematic in the case of a form dialog openned over a "fullscreen" form view. This was particularily problematic for the scrap dialog in the stock_barcode module. --- addons/barcodes/static/src/js/barcode_form_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/barcodes/static/src/js/barcode_form_view.js b/addons/barcodes/static/src/js/barcode_form_view.js index 07754344f4e..fa5b27e2a9c 100644 --- a/addons/barcodes/static/src/js/barcode_form_view.js +++ b/addons/barcodes/static/src/js/barcode_form_view.js @@ -284,7 +284,7 @@ FormController.include({ // Handle the case where there are several barcode widgets on the same page. Since the // event is global on the page, all barcode widgets will be triggered. However, we only // want to keep the event on the target widget. - if (self.target && !$.contains(target, self.target.el)) { + if (! $.contains(target, self.el)) { continue; }