How to get the URL of the PDF report (qweb report), for example file:///C:/Users/h/Downloads/test.pdf
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客戶關係
- e-Commerce
- 會計
- 庫存
- PoS
- Project
- MRP
此問題已被標幟
1
回覆
5027
瀏覽次數
Hello yasmina,
You can use below code for get url of the pdf report
base_url = self.env['ir.config_parameter'].get_param('web.base.url')
local_url = self.env['ir.attachment'].browse(new_created_attachment_pdf_report).mapped('local_url')
if base_url and local_url:
URL = base_url + '/'+ local_url
URL is final downloadable url for pdf type attachment created
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
---|---|---|---|---|
|
2
7月 23
|
6270 | ||
|
1
6月 23
|
4296 | ||
|
1
11月 22
|
3728 | ||
|
1
10月 21
|
12063 | ||
|
0
10月 21
|
1916 |