diff --git a/odoo/addons/base/ir/ir_actions_report.py b/odoo/addons/base/ir/ir_actions_report.py index 4645eb9a31c..7f2780a2ddb 100644 --- a/odoo/addons/base/ir/ir_actions_report.py +++ b/odoo/addons/base/ir/ir_actions_report.py @@ -444,7 +444,10 @@ class IrActionsReport(models.Model): ) return barcode.asString('png') except (ValueError, AttributeError): - raise ValueError("Cannot convert into barcode.") + if barcode_type == 'Code128': + raise ValueError("Cannot convert into barcode.") + else: + return self.barcode('Code128', value, width=width, height=height, humanreadable=humanreadable) @api.multi def render_template(self, template, values=None):