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

Hi is there any way to access report url widthout authentication needed?

Thanks

아바타
취소
베스트 답변

Yes, it is possible to append token on the PDF path. For example:

invoice = self.account_move
invoice._portal_ensure_token()
base_url = self.env["ir.config_parameter"].sudo().get_param("web.base.url")
pdf_url = (
f"{base_url}"
f"/report/pdf/account.report_invoice/{invoice.id}"
f"?access_token={invoice.access_token}"
)
아바타
취소