- Create new app e.g. - bench get-app library_management
- Install new app into your site e.g. - bench --site erpnext.vm install-app library_management
- Customize your form and ensure that the module name is changed to your app name e.g. - library_management
- Open file hooks.py using a text editor, such as “vi” from the location e.g. - ~/frappe-bench/apps/library_management/library_management/hooks.py
- At the end of the hooks.py file you can add line
fixtures = [“Custom Field”]
I would also add other usual customizations such as “DocType”, “Custom Script”, “Property Setter”, “Print Format”.
I can also use the same technique to add all setups that are done so that migrating setups from test to production and vice versa is easy. - Run command “bench --site mysite export-fixtures” to export all mysite customizations where you have selected Module name as your app name e.g. - library_management. The *.json files will be stored in the location ~/frappe-bench/apps/library_management/library_management/fixtures.
I haven’t tried using github yet but have read that one could upload the changes on github, or as I did, you can download those json files and put it into another system that has the same app created, into the same fixtures folder and use bench --migrate to apply the customization onto those sites that has the application installed.
hth