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.

4

How to Generate barcode image and barcode value(ean13) in QWeb Report ?

By
Ayaz Mansuri
on 12/3/15, 5:05 AM 1,339 views

Hello...!!!

I Want to Customize Product Label Report in Odoo v8.

<t t-if="o.ean13">

<div class="col-xs-4">

<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('EAN13', o.ean13, 600, 900)" style="width:100%;height:100px"/>

</div>

</t>

I've write this code in xml but it doesn't show me both barcode image and barcode value(ean13) in same format. it only show barcode image not ean13 value with that...!!!

Regards,

Ayaz Mansuri 

3
Ayaz Mansuri
On 12/17/15, 8:28 AM

Thanks Mr. Jaydeep, Your Answer really works for me. <div class="text-center" t-esc="o.ean13"/>
also Mr. Axel. I've define <span t-esc="o.ean13"/> in new table...So appreciate both of you.
Again Thank You very much

1
Jaydeep Barot (jar)
On 12/3/15, 5:43 AM

Hello Ayaz Mansuri,

upgrade your reportlab in python


following below steps and print product label report

Step 1 : Download "reportlab 3.2.0.tar.gz" from this site reportlab 3.2.0

Step 2 : Extract it and In terminal go to that folder and use this command "sudo python setup.py install"

Step 3 : restart your server and print the product label report.


Hope this one help you.


Thanks & Regards,

Jaydeep Barot

1

Axel Mendoza

--Axel Mendoza--
10238
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 12/3/15, 7:58 AM

That's because you are defining an image using that ean13 value but you are not printing the value, like:

<span t-esc="o.ean13"/>

use this <img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', o.ean13, 600, 900)" style="width:100%;height:100px"/> <div class="text-center" t-esc="o.ean13"/>

Jaydeep Barot (jar)
on 12/4/15, 8:02 AM

For what? The need is to display the ean13 value, the barcode image it's ok

Axel Mendoza
on 12/4/15, 11:47 AM

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

2 follower(s)

Stats

Asked: 12/3/15, 5:05 AM
Seen: 1339 times
Last updated: 3/14/16, 9:23 AM