Require - Doctype's public accessible print pdf url

I need to share public sharable url for my doctype (example: Sales Invoice pdf file with my Print Format). I could get some hashed url ( email notification but I want to achieve the same in SMS notification text that can be shared with my Customers or Users.

Right now, {{ doc.geturl() }} in my SMS Notification template is giving output something like this which has restricted access

Thanks in advance.
Vinod Kumar K

That is what I use :

Exemple for delivery note


1 Like

Thanks Frederic. I ll give it a try

@VinodKumarkolli just give print permissions to Guest

Be careful with this. It is not a good solution in most situations, as guest users will be able to view all invoices from easily guessable URLs. @FredericVerville’s solution is much more secure.

@peterg not if you are good at coding and you can encrypt the name

I don’t follow you. These are URLs, derived from naming series. You can’t encrypt them if you want them to work.

Giving guests print permission is a bad practice.

1 Like

@peterg you can do anything you want if you are good enough at coding . in my case I encrypted the sales invoice name to something like “mlsdkfiekjsbnwbczidqsjocvpoxcqnaizdlqsdazeqlskjlazelkjakjqslqjd=” using python encrypt and changed the download pdf function to decrypt the code before generating pdf. this way you cant guess any other sales invoice name .

This is not a good practice or good advice.