Exporting DocType

Hi,

I have made a new doctype from doctype menu, but there’s no option to export the specific doctype. How can I Export the file from my developer server to production server?

Hello,

is the custom doctype linked to a custom module/custom app? Or did you link it to an erpnext module?

The usual practice for exporting changes to and from different apps is usually done via a Git Repo.

First, make sure your custom app is linked to a git repository, add/commit/push the changes in your development server to your repo then pull the changes in your production server via bench update (or by doing git pull + bench migrate).

Of course, if you’re changing a part of the CORE (Eg. you modified Erpnext app files because there’s a bug, or you just have a new feature you’d like to contribute back), then you might want to make a Pull Request for that.

Cheers,

Hera

1 Like

I think it is linked to erpnext module. I never knew about custom app on erpnext.
So basically to export the doctype the only eay is through git repo?

That’s the usual work flow. :slight_smile:

If you changed anything in the erpnext setup, a quick git status in the apps/erpnext folder would show you all the new files/changes that you’ve done.

But if you just want to know where the files go, it usually goes to:

your_frappe_bench_folder/apps/app_name/app_name/the_module_name/doctype_name

eg:
~/frappe-bench/apps/erpnext/erpnext/crm/doctype/lead

:wink:

Edit:

You can try to copy-paste changes. Just make sure the files are pasted in the right folder… and that you’ve made the necessary changes to the UI when needed. Also, after copying the files, run bench migrate so that your database adjusts itself (well, not really) based on the doctype changes that you’ve made.

Thanks for the thorough explanation, I will try your suggestion.

1 Like

Hi @littlehera, I was learning to use git command and I am confuse with which data should I push on m repos, is it the erpnext on /frappe-bench/apps directory or /frappe-bench/sites?

Files should be in /frappe-bench/apps/the_app_you_want_to_push.

Basically, you should cd to /frappe-bench/apps/your_app_name, git init, add your remote’s URL, add your files, commit, and push.

Ok i will try it, thanks again for your help

quick question, which data should I add to my local repos? is it all the data on the <your_app_name>?