Try ERPNext Buy Support Partners Foundation

Export Fixtures for Custom Field for Specific app

Just used this technique to filter which custom fields to export during export-fixtures.

I am now tagging each custom field with the appname.

Then in hooks.py

fixtures = [{“doctype”:“Custom Field”, “filters”: [["_user_tags", “like”, ("%myApp%")]]}, {“doctype”:“Property Setter”, “filters”: [["_user_tags", “like”, ("%myApp%")]]}, {“doctype”:“Notification”, “filters”: [{“is_standard”:0}]}, ‘Auto Email Report’, “Translation”, {“doctype”:“Print Format”, “filters”: [{“module”:“myApp”}]}, {“doctype”:“Report”, “filters”: [{“module”:“myApp”}]} ]

I found that using tags is very useful in this case.

Do let me know if you have found other ways to differentiate the fields and property setters and export it.

It would be nice to have a standard mechanism used for custom apps

2 Likes

The only problem with this technique is that the tags don’t get imported into the system along with fixtures. Therefore, it becomes difficult to identify which custom fields/property setters are coming from which custom app