Odoo Help


Can OpenERP print UPC barcodes on product labels? [Closed]

Ray Carnes
on 8/2/13, 9:26 PM 3,415 views

The Question has been closed

Ray Carnes
on 08/02/2013 21:33:40

I've seen videos and have looked at some community modules but nothing I've tried works.

How are people getting this working?

Ray Carnes
On 8/2/13, 9:28 PM


UPC is now supported in ReportLab 2.7.

1) Remove the 'old' version of ReportLab:

sudo apt-get purge python-reportlab

2) If you don't have easy_install available, then install it:

sudo apt-get install python-setuptools

3) Install the 'new' version of ReportLab

sudo easy_install reportlab

4) Add support to OpenERP for UPC by adding an entry to the end of the codes dictionary in server/openerp/report/render/rml2pdf/trml2pdf.py:

'upc': lambda x:  createBarcodeDrawing('UPCA', value=x, **args),

5) Add the default_code (or the field you use for UPC) to addons/product/report/product_label.xml:

 <default_code type="field" name="default_code"/>

6) Make changes to addons/product/report/product_label.xsl to use the new tag and the default_code field:

 <barCode code='upc' height="35.0" width="55.0">
     <xsl:value-of select="default_code"/>


image description

UPDATE: I was premature about posting this. As you can see from the screenshot, the UPC code isn't formatted correctly. I will update the post when this is resolved. OpenERP is helping us do this.

Bista Solutions US, Ray Carnes
on 8/9/13, 5:18 PM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 8/2/13, 9:26 PM
Seen: 3415 times
Last updated: 3/16/15, 8:10 AM