Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Problem with barcode image

By
Matthieu
on 5/27/16, 5:16 AM 271 views

Hello,


I have a barcode and I want it to be visible in the point of sale interface. To do that, I used :

<img t-att-src="'/report/barcode/EAN13/%s' % 'AZERTY'"/>

(AZERTY is the string for the barcode temporarily)


But, currently, this do not show me a barcode but this :

http://i.imgur.com/Lkz30vp.png


Please, help me, I don't understand what is wrong with my code :(


Thanks in advance !


0
Matthieu
On 5/30/16, 3:46 AM

I solved my problem.

In facts, after trying a lot of things, the conclusion was that %s was unrecognize.

So I use now a different syntax that works :

<img t-att-src="'/report/barcode/EAN13/' + your_var" />

I hope that it will help somebody.

0
Sylvain LE GAL
On 5/27/16, 5:42 PM

did you tried to put your file in a static folder ? (or subfolder). It should fix your problem.


Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/27/16, 5:16 AM
Seen: 271 times
Last updated: 5/30/16, 3:46 AM