How to set Letter Head selection to "No Letterhead" by default for Purchase Order when Printing

Once a Purchase Order is opened in Print view, it’ll by default select the Letterhead, I want to set the Letterhead to “No Letterhead” by default for Purchase Order.

I have already unticked the “Default Letter Head” from the Letter Head List > Letter Head. It works on Other DocTypes where by default it’ll select the Letter Head for “No Letterhead” But only for Purchase Order it’ll display the Letter Head by default. It can be manually changed to “No Letterhead” but I need it to be “No Letterhead” by default. Same happens for the Sales Invoice Print View too.


Then you need to tick “Default Letter Head” for No Letterhead

Create a new Letter Head called No Letterhead and make it default.

There is no option listed as “No Letterhead” in the Letter Head List. It’s a Print View Letter Head option to remove the Letter Head. I just want to have “No Letterhead” by default for Purchase Order. This works on other DocTypes, example, Loan Application, Loan. For those it’ll select “No Letterhead” by default, this only happens in Purchase Order and Sales Invoice.

Open the Purchase Order Customization Form

Under the field of Letter Head set default

I tried this, it works on all the other Documents except for Purchase Order and Sales Invoice. Here are the steps that I followed,

  1. Created a new Letter Head named “No Letter Head”.
  2. Ticked as “Default Letter Head”

This works on other documents but not on Purchase Order and Sales Invoice.

There’s no Field name called “Letter Head” in the Purchase Order Customization


In the Print Settings Section there is…

It’s seems like a bug. I disabled all other Letter Heads and kept the newly created “No Letter Head” as Default Letter Head, but still it’ll display the Old Letter Head in Purchase Order and Sales Invoice by default even though the letter heads are disabled.

ERPNext: v14.74.4 (version-14)

I think it is coded or the purchase order/sales invoice that you are checking has the letter head that already been set, try with new order or invoice

@ransikerandeni
By default, it selects the company’s default letterhead, so try setting “No Letterhead” in your company’s DocType.

You can create a client script, this will take effect for newly created document

frappe.ui.form.on("Purchase Order", {
    setup: function(frm){
        frm.doc.letter_head = "No Letterhead";
    }
});

As a workaround I had to remove the Default Letter Head Images (Even though I had disabled it) and renamed it as “No Letter Head”. Then separately created a new Letter Head it they are needed just in case.

So even when the default letter head had been disabled and a different letter head has been set as default. Still the Old Letter head will display for Purchase Order and Sales invoice, It works normally for other documents. So this is definitely a bug.

Facing same issue here, I tried to override print.js file but the file is not getting overridden, is there any other method to do it.
Analysis on this:
Tried creating No letter Head doc but we are not able to provide the same company for it.
I am having issue in Sales Invoice,i wrote a client script on onload event but that is not working out.
I tried to set set as null in the standard js function and tried to override it the code is working fine but not able to override.
Tried to set using python on before_save that is also not working
waiting for the solution.