Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
7515 Представления

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
3692
0
мая 22
3294
0
мая 23
86
0
июн. 19
3349
0
мар. 15
4035