[FIX] barcodes: manage several barcode widgets

related to rev 0d19ee989d

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.
This commit is contained in:
Simon Lejeune
2017-11-28 15:17:59 +01:00
parent 0ca4b0f373
commit 8fb25e185b
@@ -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;
}