I would like to know what should be done to print EAN13 barcode label for a given product.
I can't see any template in the PRINT menu of the product.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I would like to know what should be done to print EAN13 barcode label for a given product.
I can't see any template in the PRINT menu of the product.
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"/>
Answer by @Axel Mendoza still works like a charm on Odoo 11.
If you run into parse errors on the '&' char you should change this for unicode. So the code should be like:
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('QR', 'text', 200, 200)"/>
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
odo v16 inventory app
Solved
|
|
3
Nov 24
|
709 | |
|
2
Mar 23
|
6023 | ||
|
4
Oct 22
|
8715 | ||
Removing Barcode
Solved
|
|
3
Jul 21
|
3294 | |
|
0
Mar 15
|
38 |
Thanks Axel. But I am a step behind. Still I don't know what steps need to be done to be able to have a print button or print menu option for a label thermal printer. Do I have to prepare a whole report from scratch??
I think that is not what you ask. You need to be consistent in what you are asking for someone can help you. If you ask for something you will get answers according to what you are asking
Thanks Axel. Well, no hard feelings and no blames, sometimes misunderstandings happen. This time I just have no idea on where to start. I have seen that thermal label printers use their own commands (usually EPSON) , I am wondering how to implement that, I guess there must be something already done.