ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Default Letterhead for a DocType


#1

It would be great if you could build in the functionality of selecting a default letterhead for a particular document. Just like you have Default Print Format in the Customize Form functionality.


#2

@jramns what is the use case? Company makes more sense!


#3

I agree that linking the letterhead per doctype would be great.

E.g. We use a “complete letterhead” which includes company information, general contact information, banking details & logo for everything related to sales (quotation, sales order, sales invoice, delivery note).

However, we use the Issue form to manage our repairs and would like to generate a Repair Report from this form. It would be great to have a different letterhead, in which there is only a small logo, so as to leave more space for the important information but still brand the document as necessary.

I tried adding the snippet hereunder to a custom script linked to the my doctype Issue, but I get the error “Field letter_head not found.”

frappe.ui.form.on(‘Issue’, ‘validate’, function(frm){
frm.set_value(“letter_head”, “Logo Only”);
})

Any idea on how to solve this?
Thanks!