Skip to content

Commit 1fe119d

Browse files
committed
[FIX] barcodes: nomenclature
Loads the barcode nomenclature only if one has been is defined. Indeed, from commit 80e89c7, the POS config unset the `barcode_nomenclature_id` field if the barcode support is not activated. opw-1859928
1 parent 0aa2bc0 commit 1fe119d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

addons/barcodes/static/src/js/barcode_parser.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ var BarcodeParser = Class.extend({
1818
// only when those data have been loaded
1919
load: function(){
2020
var self = this;
21+
if (!this.nomenclature_id) {
22+
return;
23+
}
2124
var id = this.nomenclature_id[0];
2225
rpc.query({
2326
model: 'barcode.nomenclature',

0 commit comments

Comments
 (0)