Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
5031 Vues

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

Avatar
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
2
juil. 23
6275
1
juin 23
4306
1
nov. 22
3730
1
oct. 21
12064
0
oct. 21
1918