There is an Odoo controller for reports barcode images, as docs says at: https://www.odoo.com/documentation/8.0/reference/reports.html
Barcodes are images returned by a controller and can easily be embedded in reports thanks to the QWeb syntax:
<img t-att-src="'/report/barcode/QR/%s' % 'My text in qr code'"/>More parameters can be passed as a query string<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s'%('QR', 'text', 200, 200)"/>
That controller accepts this types of barcodes:
:param type: Accepted types: 'Codabar', 'Code11', 'Code128', 'EAN13', 'EAN8', 'Extended39', 'Extended93', 'FIM', 'I2of5', 'MSI', 'POSTNET', 'QR', 'Standard39', 'Standard93', 'UPCA', 'USPS_4State'
Your image could be defined like:
<img t-att-src="'/report/barcode/EAN13/%s' % prod.ean13"/>
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 10/3/15, 2:38 PM|
|Seen: 1048 times|
|Last updated: 10/5/15, 3:30 PM|