summaryrefslogtreecommitdiff
path: root/addons/barcodes/static/src/js
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2018-06-20 16:31:01 +0200
committerNicolas Martinelli <nim@odoo.com>2018-06-21 10:40:59 +0200
commit1fe119da3bfef23b71bb4138f985cf704d23d5ea (patch)
tree5eba9f1dfd9e73cfc062c9219fffc237fb5a4975 /addons/barcodes/static/src/js
parent0aa2bc0acf36d9a8f857505da4081890307cc3e0 (diff)
[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
Diffstat (limited to 'addons/barcodes/static/src/js')
-rw-r--r--addons/barcodes/static/src/js/barcode_parser.js3
1 files changed, 3 insertions, 0 deletions
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',