Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2811 Widoki

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

Thanks

Awatar
Odrzuć
Najlepsza odpowiedź

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}"
)
Awatar
Odrzuć