Odoo Help

2

1
2 Answers
0
Avatar

Timo Talvitie, Vizucom Oy Finland

--Timo Talvitie, Vizucom Oy--
818
| 5 4 9
Tampere, Finland
--Timo Talvitie, Vizucom Oy--

Lead developer at Vizucom.

Timo Talvitie, Vizucom Oy Finland
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.

1 Comment
Damian Phang Malaysia
1/17/14, 11:37 AM

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

0
David Warner Ireland
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.

Ask a Question
Writer
Tags
Keep Informed
2 follower(s)
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