[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) <whe@odoo.com>
Signed-off-by: Steve Van Essche <svs@odoo.com>
This commit is contained in:
svs-odoo
2024-01-09 04:17:43 +00:00
parent 03cd074ee8
commit edec454f53
@@ -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);
}