I am trying to decide whether to use “$ bench --site mysite export-fixtures” or use the export customization button in developer mode to get the customizations done in the erpnext core docTypes exported to my new app.
I see that when i click export customization button (for Issue docType), a custom folder is created and a file issue.json is created.
For the bench export-fixture commands, seems the customizations will be in the ‘fixtures’ folder, with custom_field.json having all the customizations from all docTypes.
When to use bench export-fixture commands, and when to use export customization button .
If i want to use the export customization button, do i also need to add anything in hooks.py. As, i am not doing bench export-fixture. So do the changes in the /custom/issue.json automatically get installed , when i install my app… Or do i have to do something like below.
fixtures = [“Custom Field”, “Custom Script”, “Property Setter”]
export-fixture command can be used to export any doctype added to fixtures = , Further it can be filtered.
e.g. Exporting Item master or additional UOMs and installing the fixtures along with your app
Export Customization Button only deals with DocType Customization.
In case the button is used no need to use fixtures in hooks.py.
fixtures in hooks.py of your app can be used to export DocTypes other than [“Custom Field”, “Custom Script”, “Property Setter”]
fixtures as well as custom from your app will be migrated on install of the app.
Fixtures are used to Export “DATA” in general. Its mean anything and all Doctypes are saved in the tables of the database can be fitched into file and when creation and migration all data saved in the fixtures files is add automaticly into the database. but be carfull when migrate of Duplicating the data.
Export Customization :
its the same as Fixtures but limited for the customization you made into the forms the cons of using it its addition to the App main file lets say Erpnext which you need to be careful on updating to save the changes (git stash) and update after that use (git stash pop).