[FIX] barcodes: nomenclature

Loads the barcode nomenclature only if one has been is defined. Indeed,
from commit 80e89c7a11, the POS config unset the
`barcode_nomenclature_id` field if the barcode support is not activated.

opw-1859928
This commit is contained in:
Nicolas Martinelli
2018-06-21 10:40:59 +02:00
parent 0aa2bc0acf
commit 1fe119da3b
@@ -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',