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.

2

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

By
Damian Phang
on 1/16/14, 1:02 PM 5,436 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
Timo Talvitie
On 1/17/14, 4:37 AM

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.

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: 1/16/14, 1:02 PM
Seen: 5436 times
Last updated: 11/21/16, 5:36 PM