Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
7411 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
aug. 24
3644
0
mei 22
3270
0
mei 23
86
0
jun. 19
3307
0
mrt. 15
4003