تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5020 أدوات العرض

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

الصورة الرمزية
إهمال
أفضل إجابة

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
يوليو 23
6256
1
يونيو 23
4284
1
نوفمبر 22
3719
1
أكتوبر 21
12062
0
أكتوبر 21
1914