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

I have a web application for my customers, which consumes Odoo data through endpoints, I want in an endpoint to get the download url of files related to an invoice, so they can be downloaded from my website which can be accessed by my customers.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

HI,
First you need to make public=True for that record in ir.attachment.

And then the link is like "/web/content/{attachment.id}?download=true" so when someone access this url it download the content in that attachment record.

Eg: https://www.odoo.com/web/content/123?download=true

Or from attachment, you get the url from local_url variable

Regards

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ส.ค. 24
3188
0
พ.ค. 22
2921
0
พ.ค. 23
85
0
มิ.ย. 19
2976
0
มี.ค. 15
3723