Why is “Export Customizations” in the Customization form is exporting the “Custom Fields” ?
- Create a custom field for a doctype Employee
- Goto Customize Form and select doctype as Employee
- Export Customizations, you will see that the custom field is added to the employee.json
- Export Fixtures to have the “custom fields” in the “custom_field.json” file
- Now goto custom field you created, and change its type
- Now export fixtures
- Migrate the changes on another server, you will find that the changes are taken from “employee.json” because it contains the old data of the “custom field”
Any update on this please ?
It seems the Export Customizations
and Export Fixtures
features do very similar things, but the Export Fixtures
is preferred by many because it allows you to export the customisations to a new custom app, so you can customise ERPNext without polluting the ERPNext code tree.
You can add any doctype you want to the hooks.py
fixtures
in your custom app including Custom Field
and Property Setter
.
See here
In your instance it seems the Export Customizations
overrides the fixtures
, so just use one or the other not both.
1 Like
BTW, looks like Export Customizations
has been in since v7 and is the preferred way to keep your customisations version-controlled. Whereas export-fixtures
has been in since v4 and is a more generic hook to import static data.