Odoo Help

2

How to Generate Barcode in OpenERP? (Product, and Serial)

By
Damian Phang
on 1/16/14, 1:02 PM 6,380 views

I'd like to generate two barcodes for every product

#1 - Product barcode based on Internal-Reference (default code) #2 - Serial number barcode that generates from serial number associated to the product. If no serial number is associated to the product, I'd like to randomly generate the serial number and then attach it as a barcode to the product.

I've installed almost every barcode module but there are errors in generating barcode based on Internal-Reference

0

If you are already using webkit reports, creating barcodes is quite easy,

You will need the following kind of CSS declaration in your mako file

/* Introduce a new font by giving it a name and pointing to the install location */
@font-face
{
    font-family: barcode;
    src: url(/usr/local/share/fonts/mybarcodefont.ttf);
}

/* Use the new font in a css class */
.barcode-class
{
    font-family: barcode;
    font-size: 150%
}

Also in the mako file, when you are using the default_code field, wrap it into a <div> element that uses your barcode class.

%for product in objects:
    <div class="barcode-class">${product.default_code or ''}</div>
%endfor

If you are new to webkit reports and want to try them out, see this post for a quick overview.

As for cases where the default_code does not exist, you may need to write your own python code for the serial number randomization, I don't know if there is such a module available.

We're still using the standard RML, it's our weakest link in the whole ERP. I'd look into webkit thoroughly. I'd like to have several fields barcoded for sure

Damian Phang
on 1/17/14, 11:37 AM
0
David Warner
On 1/17/14, 1:59 PM

OpenERP by-default provides Barcode facility.If you go in products master,select any product,then go to print option in top section and select option Products Labels,It will download a PDF For you.You can print it with barcode printer(Zebra Printer).I have done it for one of my client.If you need any assistance,Please let me know.I will help you at my best.

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.

Register

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

2 follower(s)

Stats

Asked: 1/16/14, 1:02 PM
Seen: 6380 times
Last updated: 11/21/16, 5:36 PM