Ibrahim Rahimi
Ibrahim Rahimi

Reputation: 539

How to get the path of a pdf report downloaded in a browser in Odoo 13?

I have a method which prints a pdf report and downloads it to the OS in Odoo 13 upon clicking a button. Now, I need to get (access) the path (where it is downloaded) of this report (file) and store it in ir_attachment table of Odoo. After storing the file (report) path then I want to have a button which fetch this report from it's the path stored in database and shows it in browser for a portal user in website module. I searched a lot but could not find anyway to do it. Can anyone help me if is it possible and if yes how?

Upvotes: 0

Views: 965

Answers (1)

Saumil gauswami
Saumil gauswami

Reputation: 725

Have you check with this method get_portal_url(report_type='pdf', download=True)?

Upvotes: 0

Related Questions