Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5749 Lượt xem

I need to display the barcode in sales order window in odoo 10..

I tried this code <barCode code="Code128">123456</barCode> and also this

<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s&amp;humanreadable=1' % ('Code128', '123456', 600, 100)"                                              
                                                style="width:600px;height:75px;"
                                            />


but these two doesn't work for me..

The above code will work in the report, but i need to display it in the Sales Order window..

 

Can anyone help me to resolve this issue..
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

If I'm not mistaken, there is no widget barcode for a tree view. Basically, you have 2 options:

  1. Develop your own js widget similar to the form barcode widget 'code'. Look at barcodes/static/src/js

  2. Save a barcode as an image (binary). Show it in a tree view using any module to show pics in a tree view. Have a look for example here: https://www.odoo.com/forum/help-1/question/odoo-7-how-can-i-add-images-in-sale-oder-line-or-in-treeview-generally-483

Ảnh đại diện
Huỷ bỏ
Tác giả

Thank you for your answer...

It's really helpful to me.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 9 18
106
1
thg 5 17
8466
0
thg 2 25
1123
2
thg 12 24
1456
0
thg 7 24
1203