Custom Print Format Examples

Hi all,

Are there any working Server side Custom Print Formats available or that people are willing to share?

I’m looking for a starting point to write a Custom Print Format for Sales Order but all the online resources I can find:

Are client side and thus unsuitable.

The example here: https://erpnext.com/user-guide/customize-erpnext/print-format

Is OK but doesn’t contain any of the row fields to show me the syntax, etc.

Would be great if anyone was willing to share a server side custom print format in any area just to give an idea of how to start coding a custom format.

Cheers
Liam.

Hold on a bit. New Print Format System coming in v5

Oh I’m hanging out for V5 for sure - any ETA?

In the interim can you confirm the syntax for printing a Sales Order Item field on a custom print format?

I’m find adding doc.[fieldname] easy enough but how can I add other doctype values (like Sales Order Item) in there within a table?

Print Format help says to use syntax:

frappe.db.get_value(“[doctype]”, “[name]”, “fieldname”)

But trying frappe.db.get_value(“sales_order_item”,“item code”,“item_code”) returns “None” on the printout.

Please assist as with that syntax a custom Sales Order should be easy to design.

Thanks.
Liam.

I have exactly the same issue, has there been progress on this? I’m lost as in where to start to customize the items table in my custom print format. Shouldn’t be as obscure I reckon…

@gio-avk there’s been progress in that you can use a Print Format Builder now. Since all of my Print Formats are code I continue to use them. See this section of the manual: https://frappe.github.io/erpnext/user/manual/en/setting-up/print/print-format-builder

https://docs.erpnext.com/docs/user/manual/en/setting-up/print/print-format-builder