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

Hi Dear,

I add an new char field to product.product as a "product_url" widget="url"

I need to add this field to qweb report for sale order where the cusomer could use this soft copy from sale order to visit product data sheet for more info.

I used the the following attribute:

<a href="line.product_id.product_url">data sheet link</a>, after print sale order pdf and click on data sheet link the attribute act as follow

http://localhost:8069/line.product_id.product_url not went to product data sheet link

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất
Try <a t-attf-href="line.url_field">URL</a> Hope it will works.
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

<a t-attf-href =" #{line.product_id.product_url }" >data sheet link </a>

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

I'm facing a same issue and my hyperlinks are not working on the qweb report.

Let me know if anyone know what might be the issue.

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

Replacing "href" to "t-attr-href" in you code. like:

<a t-attr-href="line.product_id.product_url">data sheet link</a>

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất
<a t-att-href="line.field">text to display</a>
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 25
10916
2
thg 7 19
16165
3
thg 12 19
5251
1
thg 7 25
1876
1
thg 5 25
854