ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Export Customizations vs Fixtures


#1

Hi,

Long time reader, first time poster here. I’d been working on a custom app. I’m having a bit of a trouble wrapping my head around these

  • Exporting customizations from Customize Form, creating a [app]/[module]/custom/[doctype].json file, which are required to be migrated when apps are updated
  • Exporting fixtures from the bench cli, creating a [app]/fixtures/[custom_thing].json file, which gets installed when the app is installed

My queries are

  • Under which conditions should we use one method of customization over the other?
  • I know that Custom Field, Custom Script and Print Format could exported as fixtures. What else could be exported?

Erpnext Customization - Error in migrating to new server
#2

Thanks, for the information.


#3

I use fixtures a lot for different doctypes…I you want I can show you my list


How to merge your developer mode to production kode
#4

As far as I know… Fixtures allows you to apply changes on many frappe/erpnext instances with just installing custom app… where export-customization is only for your current instance


#5

@chabito79 So far I have used fixtures for Custom Field, Custom Script and Property Setter, doctypes under the module Custom. And yes, it would be really helpful to see your list.

@jof2jc Makes sense. Export customization and migrations only for a single instance. Fixtures and apps for multiple instances.


#6

Hello @jof2jc @sunhoww

Do you mean that it can be used when we need to do bench reinstall?
Because when doing bench update, then all the customization that was done using customize form will remain and no need for exporting and importing it. But when doing bench reinstall (which is used for reset the database), so it will wipe every thing.
Otherwise: why we need to export the customization? Just as backup or we need to import it later after resetting the database using bench reinstall?

Regards
Bilal


#7

One use case for exporting customizations from Customize Form would be precisely that. Another would be to apply the same customizations to another site.