Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
15355 Vistas

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

Avatar
Descartar
Mejor respuesta

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.

Avatar
Descartar
Autor

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

Mejor respuesta

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.

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
sept 23
1970
0
ago 16
4150
0
mar 15
4798
0
jul 24
3437
1
ago 25
1449