콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4674 화면

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
7월 23
5622
1
6월 23
3836
1
11월 22
3402
1
10월 21
11756
0
10월 21
1746