Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4862 Visualizzazioni

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

Avatar
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
lug 23
5992
1
giu 23
4084
1
nov 22
3574
1
ott 21
11948
0
ott 21
1860