Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
7342 Переглядів

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
3594
0
трав. 22
3232
0
трав. 23
86
0
черв. 19
3280
0
бер. 15
3967