コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
3927 ビュー

Hi,

I want a button for download a file in my server. Odoo 14 server and file to download are same server. For example my file is in " /home/web/web.pdf " on website when I press the button I want to download web.pdf.
How can I link it?


many thanks

アバター
破棄
最善の回答

To keep it simple, you can link your buttons to filehosting/filesharing platforms (Nextcloud, Drive, ...) where you host your files and share them for download.

BR

Ricardo

アバター
破棄
最善の回答

You need to write a controller to return the download response. You can refer to this function in Odoo for downloading PDF reports.

@http.route(['/report/download'], type='http', auth="user")
def report_download(self, data, token, context=None):

In your case, you have to browse the file and return the download response.

アバター
破棄
関連投稿 返信 ビュー 活動
3
8月 24
1872
2
9月 15
7316
2
7月 25
1362
1
5月 25
845
2
5月 25
1464