How to Import Custom Standard Print Format to new Installation

Hi all, we have created our own standard print format. Upon saving, we found that a JSON file is created for it, which is expected based on the documentation. We have pushed this JSON file to our repo for it to be transferred to our production installation. After pulling updates from our repo and performing migrate, it seems that the print format we created is not imported to production. Can someone tell me how to import our custom format? Thank you.

It turns out that the print format is not migrated back via bench migrate because the old version of the Print Format (with the same name) exists in the production installation. Deleting the old version and performing migrate did the trick. I hope this can help someone else (or help me remember when this happens again in the future).

1 Like

Hello @rlvillacarlos,

do you know where are Printformat templates are stored?

Regards
Kevin

When in developer mode, you can set your custom print format as Standard then set its Module to your custom app. This would generate a JSON file for print format under the Print Format directory in your custom app.

Hello @rlvillacarlos,

i have add fixtures = [“Print Format”] within hooks.py file and export them. I have a .json file with printformat Templates.

Do you know how i can import the printformat.json file to a new erpnext Server?

I have seen i can export print formats within ERPNext Webinterface but i can´t import them cause permission issues. If i create a new Printformat Doctype import is working but i must modify them…

Regards
Kevin

If you do bench migrate then that should import all fixtures.

1 Like

Thank you @rlvillacarlos it does work!! :star_struck:

1 Like