Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
8432 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
0
août 24
4094
0
mai 22
3712
0
mai 23
86
0
juin 19
3793
0
mars 15
4451