Print format custom selection in print view


Is there a way to filter selection of print formats, and auto default certain print format based on condition in document, in print view ?

Check it.

Thanks NCP.

the situation :
1 site with multiple company
each company have it’s own print format

the goal :
when printing document for specific company, I want to filter out the print format from other companies from print format combobox.

Is this possible ?

not possible from the user interface. it’s difficult to filter out the company wise print format because there is a no option.

I put this in Client Script (From the UI) on refresh method, but it doesn’t work.
I am using Frappe /ERPNext v14.

Any idea ?

Client Script worked on doctype.

It not work on the print UI level.

But where do you apply the filter? Here?

That’s the one

Not possible to using client script because it’s defined in the core print file.

I see. Thank you NCP