Custom Print Format missing html file

I’m having trouble locating my custom print formats. I’ve created them under my custom app, yet the templates folder is empty. The only way I can get anything related to my custom formats is if I select “Standard” as Yes, then they appear in a folder called print_format, as a JSON file.

My objective is to pass some data as context using frappe.render_template, however all of the examples I’ve seen point to a .html file, which I can’t find. The JSON file I mentioned above has the html, but I doubt this can be used for render_template.

Is there something I’m doing wrong here? I’ve also searched all of the frappe dir’s and found core print templates, in those folders there’s a json file, and the html file… any ideas why mine aren’t showing up?


I sure wish these forums were more active. I’m new and will contribute where/when I can.

I asked chatGPT where to find the template for Sales Invoice. I got several results but none
were correct. Some of the answers may help you.

  1. Look in the database in table tabPrint Format
    The other answers probably wont apply but for completeness:
    2.frappe-bench/apps/erpnext/erpnext/erpnext/doctype/sales_invoice look inside .py files for HTML
    └── apps
    └── erpnext
    └── erpnext
    └── print_format
    └── <invoice_template_name>.js

I was not able to find the location for the standard print format for Sales Invoice.
Sorry to hijack your thread but if you or anyone else knows where to find it, do tell.
I’m not interested in modifying it but I’d like to see how its formulated so I can
use some of the code in custom templates using the HTML field type.

1 Like