Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
4588 Vistas

Hi, 

In odoo, you can print picking barcode. This mecanism is based on the name of the picking that is sent to controller /web/report/.. and returns a png. 
However, i would like to get the serial number (123456789012..) of the generated barcode because i need to print it in zebra label. is there a way to do so ? 


I think about adding a new field barcode to picking and generate one barcode on my own. but that would also mean i need to change the report to consider it instead of the name of the picking. Also, i ignore if there are other things that must be changed too.. 

Regards.

Avatar
Descartar
Mejor respuesta

Picking does not have any field to store the barcode serial number which you are looking for.

The system uses the "name" field of the picking to generate the barcode label in the report pdf.

If you scan the barcode label, it will give you the value of the picking name only and not the serial numbers.

You can see the following code using "o.name":

<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', o.name, 600, 100)" style="width:300px;height:50px;"/>


Avatar
Descartar
Autor

Hello,

yeah, i know that. I said odoo considers name to render the png.

My question is about what should be modified if i consider adding a new field barcode and generate a png based on the given barcode.

For now, i only see 2 things:

- change name to new field barcode in report

- in stock barcode, search will be with new field barcode instead on name.

Thanks.

In that case, you should create a new field as you said, and change the reports, and also add the new field in search.

Publicaciones relacionadas Respuestas Vistas Actividad
0
ago 22
11021
0
mar 15
4419
0
oct 24
1199
0
feb 25
1234
0
dic 24
46