Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
7350 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Aug. 24
3603
0
Mai 22
3241
0
Mai 23
86
0
Juni 19
3282
0
März 15
3971