diff --git a/addons/report/controllers/main.py b/addons/report/controllers/main.py index 56236990316..ba8016f6ea1 100644 --- a/addons/report/controllers/main.py +++ b/addons/report/controllers/main.py @@ -85,6 +85,10 @@ class ReportController(Controller): :param humanreadable: Accepted values: 0 (default) or 1. 1 will insert the readable value at the bottom of the output image """ + if type == 'UPCA' and len(value) in (11, 12, 13): + type = 'EAN13' + if len(value) in (11, 12): + value = '0%s' % value try: width, height, humanreadable = int(width), int(height), bool(humanreadable) barcode = createBarcodeDrawing(