- Barcodes are images returned by a controller
- Quite easy 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)"/>
'Codabar', 'Code11', 'Code128', 'EAN13', 'EAN8', 'Extended39', 'Extended93', 'FIM', 'I2of5', 'MSI', 'POSTNET', 'QR', 'Standard39', 'Standard93', 'UPCA', 'USPS_4State'
From OpenDays 2014 presentation by Simon Lejeune.
See a live demonstration on: demo.odoo.com/report/barcode/Code128/AZWERTY
The way you mentioned is fine for a single barcode image to be inserted in the report but what to do if we want to add a dynamic barcode and image for every new order ?
I need to do that for the purpose of scanning a customer order in a tailor shop when he comes to collect his order. When a customer comes, he take a reciept of his order and then when he come back to collect the completed order after a mentioned time, then we should be able to search the order through barcode scanner. For that every order must have a unique barcode.
About This Community
|Asked: 2/5/15, 6:54 AM|
|Seen: 6288 times|
|Last updated: 11/18/16, 7:49 AM|