콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
9793 화면

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

아바타
취소
관련 게시물 답글 화면 활동
1
6월 22
5691
4
5월 24
7374
1
7월 23
2431
3
6월 23
3349
5
5월 23
15533