From edec454f53caeafdb5d63ac025e0a0ed29c944f7 Mon Sep 17 00:00:00 2001 From: svs-odoo Date: Tue, 14 Nov 2023 14:12:11 +0100 Subject: [PATCH] [FIX] barcodes: upc_ean_conv always undefined Before this commit, for a barcode rule with the UPC-A encoding, the condition's checking if we should convert an EAN-13 to an UPC-A was always false because the key `upc_ean_conv` was checked on the wrong object (`this` instead of `this.nomenclature`.) task-3472884 closes odoo/odoo#147955 X-original-commit: b3435d1b4a39032bc7e0f74b70cfda992410fd4c Related: odoo/enterprise#53600 Signed-off-by: William Henrotin (whe) Signed-off-by: Steve Van Essche --- addons/barcodes/static/src/js/barcode_parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/barcodes/static/src/js/barcode_parser.js b/addons/barcodes/static/src/js/barcode_parser.js index e11b2fc7bcd..e31a51246b3 100644 --- a/addons/barcodes/static/src/js/barcode_parser.js +++ b/addons/barcodes/static/src/js/barcode_parser.js @@ -201,7 +201,7 @@ export class BarcodeParser { } else if (rule.encoding === 'upca' && this.check_encoding(barcode,'ean13') && barcode[0] === '0' && - this.upc_ean_conv in {'ean2upc':'','always':''} ){ + this.nomenclature.upc_ean_conv in {'ean2upc':'','always':''} ){ cur_barcode = cur_barcode.substr(1,12); }