From 1fe119da3bfef23b71bb4138f985cf704d23d5ea Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 20 Jun 2018 16:31:01 +0200 Subject: [PATCH] [FIX] barcodes: nomenclature Loads the barcode nomenclature only if one has been is defined. Indeed, from commit 80e89c7a11d16fa, the POS config unset the `barcode_nomenclature_id` field if the barcode support is not activated. opw-1859928 --- addons/barcodes/static/src/js/barcode_parser.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/barcodes/static/src/js/barcode_parser.js b/addons/barcodes/static/src/js/barcode_parser.js index d834f3cbd27..cf357a438b2 100644 --- a/addons/barcodes/static/src/js/barcode_parser.js +++ b/addons/barcodes/static/src/js/barcode_parser.js @@ -18,6 +18,9 @@ var BarcodeParser = Class.extend({ // only when those data have been loaded load: function(){ var self = this; + if (!this.nomenclature_id) { + return; + } var id = this.nomenclature_id[0]; rpc.query({ model: 'barcode.nomenclature',