Ir al contenido
Menú
Se marcó esta pregunta
4 Respuestas
13453 Vistas

Use case: I want to download a PDF from a button or a link on the website. 


Two solutions:

1. Use Studio to generate a URL that will be added on the website directly in a specific place

2. Add an external URL in a specific place on the website that will redirect to the download page

Avatar
Descartar
Autor Mejor respuesta

1. Use Studio to generate a URL that will be added on the website directly in a specific place.

Go into Settings --> Technical Menu --> Attachments

Upload the PDF you want to be downloaded from the website

Open Studio and add on the attachment the existing field called Website URL

The field will generate automatically an URL to be attached on the website in order to allow the download

Go on the website and selected a place where you want this link to be clickable and downloadable (can be a word in a text, etc)

Open the edit mode and click on CTRL + K (or select Link icon from the edit menu)

Add now the URL generated from the attachment with only  basic domain name of the page / URL generated with Studio and activate option open in new window and save

Click now on the link and Odoo will open a new window with the document selected



2. Add an external URL in a specific place on the website that will redirect to the download

 page

If you don't have Studio you can create a public drive where you can store the documents that you want to be downloadable from your Website

The same above procedure will apply.

You will decide where you want the link to download you want to be and you will add a direct redirection to the URL of your document in the drive.

Avatar
Descartar

I used solution 1: Works like a charm. Thanks a lot!

Mejor respuesta

For users of the community version (or without studio) this is also possible by simply adding for example a columns block to the web site and replacing the image with a .pdf document, which can be downloaded by clicking on this or inserting a document (from insert image feature) into a text who can also be downloaded the same way.


Avatar
Descartar
Mejor respuesta

If it's a future that they promised , but didn't pulled it off, that will be disappointing. 


But probably it's just to activate a module or a setting


I opened a ticket on odoo help and I'll come back with their answer

Avatar
Descartar

That's great Nicu, thanks a lot!

Mejor respuesta

Hi Raluca, 

I was looking for a solution when i stumbled upon your post. 

It works perfectly fine while your steps are easy and clear to follow.

Thanks for this, all the best! 

Avatar
Descartar

in odoo v15 at least in this presentation https://www.youtube.com/watch?v=HRn8VcVCsVg&t=565s at minute 9:15 says about the posibility to add a download link of a file... but sadly i cannot find it!

I took a look Nicu but I could not see it either.
Don't know how they pulled this off.

Publicaciones relacionadas Respuestas Vistas Actividad
0
mar 24
11188
1
dic 21
1931
1
ene 24
3853
3
jul 23
9734
1
ene 23
3433