I've made a custom_module with a binary field to attach files, and a website_custom_module that shows the info of my custom_module. How can I put a button in my website template to download said attachment?
Any ideas? Thanks in advance!
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I've made a custom_module with a binary field to attach files, and a website_custom_module that shows the info of my custom_module. How can I put a button in my website template to download said attachment?
Any ideas? Thanks in advance!
Hi,
Here, an example how to allow user downloading an attachment file from website :
<a class="list-group-item list-group-item-action d-flex align-items-center oe_attachments py-1 px-2" t-foreach='task.attachment_ids' t-as='attachment' t-attf-href="/web/content/#{attachment.id}" target="_blank" data-no-post-process="">
<div class='oe_attachment_embedded o_image o_image_small mr-2 mr-lg-3' t-att-title="attachment.name" t-att-data-mimetype="attachment.mimetype" t-attf-data-src="/web/image/#{attachment.id}/50x40"/>
<div class='oe_attachment_name text-truncate'><t t-esc='attachment.name'/></div>
</a>Best regards!
I need to put one download button which will download the .exe file associated with that.
How can i do that ?
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký| Bài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
|---|---|---|---|---|
|
1
thg 11 25
|
3472 | |||
|
4
thg 11 25
|
3815 | |||
|
1
thg 7 23
|
3344 | |||
|
0
thg 7 22
|
2741 | |||
|
Add Attachement From website.
Đã xử lý
|
2
thg 2 24
|
26702 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.