Export customizations made to standard DocType

Hi,

I have created 2 sites: dev.local and test.local. In dev.local, I have made a new App which contains a new DocType named “HR Accident”. ERPNext is also installed in dev.local. Still in dev.local, I have customized the standard DocType “Employee” from ERPNext to add a new Table section linked to the DocType “HR Accident” from my new app. I have added both modified DocType, “HR Accident” and “Employee” to hooks.py and I ran the command “bench frappe --export_fixtures”, which was successfull. I changed the default site to test.local, on which my new App is also installed, and I ran the command “bench frappe --latest”, which was also successfull: both DocType showed as imported. My new DocType from my new App gets updated, but not the “Employee” DocType, from which my new section is missing. What steps am I doing wrong?

Also, the scenario described above works fine if both production and development sites reside on the same server, but what if I want or need to keep my development server separated from the production server, I guess I then need to use a GitHub account, is that correct?

Thank you very much for your help!

Bernard Lefebvre


Update: I found out by looking at Luis Fernandes’ App that I needed to add “Custom Field” and “Property Setter” in the Fixtures…

Yes - to edit the standard DocTypes you need to add Custom Fields, then export them as Fixtures…

Side comment: Why do you want HR accident inside Employee, best to keep it separate

Hi M. Mehta,

Thank you for the suggestion.
I am now able to create a new module and add my custom DocType in it, this is working fine, but when I try to add a DocType (Accident Records) under the existing “HR” module, it does not appear. I am using the “Administrator” account, which has permission on the new DocType. What do I need to do in order to make it appear?

Thank you

Add an hr.py in your config folder - similary to config/hr.py in erpnext and add your module where you want.