Hi all, I just made this app that generates a PDF immediately when a document is submitted. At the moment it works for Quotation, Sales Order, Sales Invoice and Delivery Note.
The motivation is that I always want to know which PDF is the original that I sent to the customer while the print format might change over time.
Hi @rmeyer
I like this function. Actually I see this as core function for ERPNext, because this is an easy and realiable way to save the status that went into the world (including data that was added in a print format which can be changed after submitting the doc itself).
Just testing it.
I see there is an option missing to freely set documents where this app works. It’s just a predefined list of 5 doctypes.
Do you still support this app or shall I do an independent fork and maintain by myself?
glad you like our app. Yes, we’re actively using and supporting it.
This app was built specifically for sales documents because we are legally required to persist them. The app automatically prints them in the customer’s language and puts them in a folder that is named like the customer. If we take away these features, it could apply to any DocType.
Please let me know if you would be willing to sponsor this feature and / or a contribution to the core.
Currently PDFs are stored in a {{ doctype }}/{{ customer }} folder hierarchy. For example, Sales Invoice/Customer Ltd/SINV-0001.pdf. So if you open the File List in ERPNext you should see a “Sales Invoice” folder, inside that a folder for each Customer, and inside that the Sales Invoice PDFs.
It should be doable to also add purchase documents and name the folders like the supplier.
Intresting. Also, An entry to tracking log along with link to pdf file will be helpful to know timeline comparison along with presenting quick navigation to pdf file.
@rmeyer
I mean, the version trail at the bottom if tracking is enabled. (entire list can be found at domain.name/desk#List/Version/List with docType as Sales Invoice)
@Paul_Frydlewicz I updated the app to work with any submittable DocType. Check out the version-13-beta or develop branch to try it (won’t make it to version-12).
V13 beta is pretty usable already, but still you must expect a lot of changes and errors. I would recommend to only use the stable version in production.
I have a question regarding permissions with submitted pdfs.
Once a pdf is attached, the Read permissions are virtually set for every system user, isn’t it. As from my experience, I cannot limit read access to files attached based on user roles.
yes right, but in this case, the permissions should not depend on the doctype “File”, but the doctype which the pdf represents, e.g. Sales Invoice or Quotation.
I see here a basic lack of permission control on ERPNext side, which is essenial.
Do I miss something?
New to how to include this, but going to test this. Looks promising. I was working around in python to achieve this in a different way, but your solution makes more sense. Thanks.
The app uses the builtin attachment feature of Frappe / ERPNext. So all files are stored on the server in ~/frappe-bench/sites/[YOUR SITE]/private/files. Maybe you can mount some other file system at this location?