How to Manage Patches, Fields and Customization in Frappe

I have created some additional fields to Existing doctypes and same repo from git serves 2 separate instances.
When used Customize Form, the fields are not added to Doctype JSON, but updated in database tabcustom_fields, in this case the code in git repo wont get these new fields
How can we manage these in Frappe code ???

You can switch to developer mode by running bench set-config developer_mode 1 in your bench folder, then restart your bench and access your site again. At this point if you access the doctype you want to customize an “Edit Doctype” option should appear in the same menu you can access “Customize Form”.
If you make any changes by running this option (editing doctype), the structure of the doctype will be modified in the database. However, if you are modifying Frappe core doctypes, you won’t be able to access your changes via git serving different instances. Maybe developing a custom app would be a better option as you can manage it via git, but that would depend on the requirements of each particular case.

1 Like

Thanks @Bradley , creating Custom Apps is definitely a solution, but when I need to customize existing Doctype of ERPNext (e.g Sales Order or Employee), then these additional fields go in Database and the 2 instances run on different databases, and this is where I get Stuck. So how do i solve this?
is there any way where, I can add a code in frappe/ERPNext , and it creates a field in DB table and removes or Alters the field in DB table

Two Ways I know


useing Fixtures


1 Like

Maybe fixtures will work nicely in the scenario you’re describing. Check this out: