Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
5180 Zobrazení

How to get the URL of the PDF report (qweb report), for example    file:///C:/Users/h/Downloads/test.pdf

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
čvc 23
6591
1
čvn 23
4480
1
lis 22
3914
1
říj 21
12232
0
říj 21
2045