This question has been flagged
3 Replies
5453 Views

I have a report to print labels, in it I have:

<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', label.default_code, 600, 150)" style="width: 40mm;height: 12mm;horizontal-align: center"/>

On the report the barcode is not printed (a blank area), but if I change the report type to html, then it works fine and the barcode is displayed on the screen, but I need it in PDF of course for printing.

I tried with wkhtmltopdf versions: 0.12.1 , 0.12.3 , 0.12.4 , 0.12.5

What could be wrong?


Avatar
Discard

Reportlab is properly installed (in html the label with barcode is displayed correctly, testing /report/barcode... in browser works fine), so I think the problem is not the same, I believe it is actually related to wkhtmltopdf.

Author Best Answer

Found this: https://github.com/odoo/odoo/issues/3234 -->

Another thing to check is that the 'web.base.url' system parameter is set correctly - it's especially easy to get caught out by this if you've changed the default XML-RPC port. I've got Nick-OpusVL to thank for highlighting this little gotcha: #1105

So  I corrected report.url and web.base.url because those were still pointing to the production environment instead of this new testenvironment: solved my problem

Avatar
Discard

Can you explain

- try in your browser:  http://localhost:8069/report/barcode/Code128/test-0001
does that show the barcode:
yes-> check system parameters
no-> install reportlab

system parameters:
set report.url to http://127.0.0.1:8069

That's what solved it for me.

On Thu, May 9, 2019 at 1:07 PM Ahmed Salah <ahmedodoo11@gmail.com> wrote:

Can you explain

Sent by Odoo S.A. using Odoo.



--
Alain Van Utterbeeck

ODOO Developer


 

DR Gaming Technology Europe nv/sa


–––––––––––––––––––––––––––––––––


DISCLAIMER


This e-mail is from DR Gaming Technology nv/sa located in Belgium (BE).The messages you send and/or receive are transmitted via the Internet. It is therefore impossible for us to guarantee the confidentiality, accuracy and completeness of data and/or documents that are sent by electronic mail and we accept no liability for consequences and/or damage whatsoever related to data and/or documents which are thus communicated. The information in this e-mail is confidential and intended solely for the person to whom it is addressed. If this message is not addressed to you, please be aware that you have no authorisation to read the content of this e-mail, to copy it or to furnish it to any person other than the addressee or take any action in reliance on it. Should you have received this e-mail by mistake, please bring this immediately to the attention of the sender, after which you are kindly requested to destroy the message and not to disclose or disperse its content. Only when this message is supported by lawfully signed documents can any rights be derived from the content of this message with regard to DR Gaming Technology nv/sa.

Best Answer

Hi,

Check whether the Python package reportlab is installed or not. If not install it and also refer this similar question already asked and solved: https://www.odoo.com/forum/help-1/question/the-barcode-is-not-displayed-in-qweb-report-odoo-92297


Thanks

Avatar
Discard