Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4584 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
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.

Related Posts Odpovědi Zobrazení Aktivita
0
srp 22
11014
0
bře 15
4417
0
říj 24
1195
0
úno 25
1233
0
pro 24
46