This issue is around the default PDF files that are loaded into the dialog's child table.
Current behavior: Get all PDF files that are attached to the current document, from where the dialog is called.
Additional feature idea: Allow hooks to be provided by custom apps, to provide custom default PDFs. Example use case: A user links Purchase Invoices of traveling costs to Business Trips and therefore wants to merge pdfs of Purchase Invoices as well.
This could look like this:
hooks.py in custom app:
"default_pdfs_for_pdf_merger": {
"Business Trip": "my_custom_app.scripts.business_trip.default_pdfs_to_merge"
}
in business_trip.py:
def default_pdfs_to_merge(doc):
return frappe.db.get_all("File", ...)
This issue is around the default PDF files that are loaded into the dialog's child table.
Current behavior: Get all PDF files that are attached to the current document, from where the dialog is called.
Additional feature idea: Allow hooks to be provided by custom apps, to provide custom default PDFs. Example use case: A user links Purchase Invoices of traveling costs to Business Trips and therefore wants to merge pdfs of Purchase Invoices as well.
This could look like this:
hooks.py in custom app:
in business_trip.py: