Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
7144 Zobrazení

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.

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
srp 24
3487
0
kvě 22
3162
0
kvě 23
86
0
čvn 19
3196
0
bře 15
3887