Hi everyone,
I have a question regarding best practices for moving customizations into a custom app.
Context
- I created several Doctypes via the UI, so they are currently stored as
custom=1in the database. - I also have Print Formats, Dashboards, Dashboard Charts, Reports, Client Scripts, and Server Scripts created in the same way.
- Now I’ve built a new custom app, and I want ERPNext to read all of these from the app instead of the core/DB.
- The goal is to make sure everything is safe during upgrades, and that I can always pull them back from GitHub if needed.
My question
What is the correct way to:
- Move existing custom Doctypes (custom=1) into my custom app so they become part of the app (
custom=0)? - Do the same for Print Formats, Dashboards, Dashboard Charts, Reports, Client Scripts, and Server Scripts?
- Ensure that after migration, ERPNext loads them from the app, and I can safely delete the DB-only versions?
Reference I also opened a related feature request on GitHub: #50102 – Add “Move Custom Doctype to App” Option in Developer UI. But until such a feature exists, I’d like to know the recommended manual process.
Goal
- Keep all customizations version-controlled in my app
- Ensure they survive upgrades
- Be able to reinstall them easily from GitHub on a fresh site
Would love to hear from the community: what’s the cleanest and safest workflow you use for this scenario?
Thanks, Ahmed