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

Hello...!!!

I Want to Customize Product Label Report in Odoo v8.

<t t-if="o.ean13">

<div class="col-xs-4">

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

</div>

</t>

I've write this code in xml but it doesn't show me both barcode image and barcode value(ean13) in same format. it only show barcode image not ean13 value with that...!!!

Regards,

Ayaz Mansuri 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello Ayaz Mansuri,

upgrade your reportlab in python


following below steps and print product label report

Step 1 : Download "reportlab 3.2.0.tar.gz" from this site reportlab 3.2.0

Step 2 : Extract it and In terminal go to that folder and use this command "sudo python setup.py install"

Step 3 : restart your server and print the product label report.


Hope this one help you.


Thanks & Regards,

Jaydeep Barot

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Thanks Mr. Jaydeep, Your Answer really works for me. <div class="text-center" t-esc="o.ean13"/>
also Mr. Axel. I've define <span t-esc="o.ean13"/> in new table...So appreciate both of you.
Again Thank You very much

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

That's because you are defining an image using that ean13 value but you are not printing the value, like:

<span t-esc="o.ean13"/>

Ảnh đại diện
Huỷ bỏ

use this <img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', o.ean13, 600, 900)" style="width:100%;height:100px"/> <div class="text-center" t-esc="o.ean13"/>

For what? The need is to display the ean13 value, the barcode image it's ok

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 1 24
1584
0
thg 1 24
1263
0
thg 2 22
2473
1
thg 12 19
5493
2
thg 9 16
10082