Skip to content

Feauture: Hook to overwrite default PDF #2

@PatrickDEissler

Description

@PatrickDEissler

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", ...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions