Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4596 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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;"/>


Awatar
Odrzuć
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.

Powiązane posty Odpowiedzi Widoki Czynność
0
sie 22
11029
0
mar 15
4421
0
paź 24
1203
0
lut 25
1240
0
gru 24
46