summaryrefslogtreecommitdiff
path: root/addons/barcodes/static/src
diff options
context:
space:
mode:
authorLucas Perais (lpe) <lpe@odoo.com>2017-06-16 08:41:58 +0200
committerLucas Perais (lpe) <lpe@odoo.com>2017-06-16 08:41:58 +0200
commitbf5312428f4550091bbfe0fdf940330796af951a (patch)
treec32a75c70ab6041a9d6e86d697dcb2923bf1b859 /addons/barcodes/static/src
parentd771f612b471505e51f4190c64c0b6cad3112f69 (diff)
[FIX] barcodes: comply the ean parser with reportlab.graphics.barcode
Before this commit, the JS parser would add 0 after the input, then add the ean key. Whereas reportlab.graphics.barcode fills the input with 0's on the left, then add the key http://pydoc.net/Python/reportlab/2.5/reportlab.graphics.barcode.eanbc/ At: Ean13BarcodeWidget.__init__() This commit makes the ean parser coherent with the lib the python uses
Diffstat (limited to 'addons/barcodes/static/src')
-rw-r--r--addons/barcodes/static/src/js/barcode_parser.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/barcodes/static/src/js/barcode_parser.js b/addons/barcodes/static/src/js/barcode_parser.js
index 1f804a40fea..0a356661cf6 100644
--- a/addons/barcodes/static/src/js/barcode_parser.js
+++ b/addons/barcodes/static/src/js/barcode_parser.js
@@ -102,7 +102,7 @@ var BarcodeParser = Class.extend({
ean = ean.substr(0,13);
for(var n = 0, count = (13 - ean.length); n < count; n++){
- ean = ean + '0';
+ ean = '0' + ean;
}
return ean.substr(0,12) + this.ean_checksum(ean);
},