Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
4291 Vistas

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

Avatar
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jul 23
5078
1
jun 23
3426
1
nov 22
3057
1
oct 21
11574
0
oct 21
1667