Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
9744 มุมมอง

Hello there,

I have a model my_model_name 'inherit product_template', and i'd like add an attachment (pdf file).

Module 'Document' does'nt exists, the model is real ir_attachment ???

(website, i created a button btnDownloadPDF to get the product's file PDF).

Thanks


อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Hi,

I saw this feature but the download option ain't present with website_sale.

The solution is :

into ir_attachment (res_id,res_model,product_downloadable) and allow the digital files in odoo configs.

<a t-attf-href="{{product.src}}" class="btn btn-primary">Download its PDF file here </a>

Thanks for all and close.

อวตาร
ละทิ้ง
ผู้เขียน

I'd like website_sale, a user could click a link to download the PDF file.

E.g <a href='${product.attachment_id.src}'>You can download its PDF file here</a>

คำตอบที่ดีที่สุด

Hi,

Not sure what exactly your problem is. If you have given 'Document as the depends for the module you are creating, change the name to 'document' as it is case sensitive.

In Odoo12, by activating the developer mode and you can add attachments to record by, clicking the lady debugger button near logged in user name and click Manage Attachments.



Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 22
5622
4
พ.ค. 24
7272
1
ก.ค. 23
2382
3
มิ.ย. 23
3267
5
พ.ค. 23
15445