How to have ERPNext updates/patch fixes along with my Custom App?

Okay, I read the documentation and understood to build something different, I can have my Custom app build in local. I have 2 doubts in building custom app.

  1. Should I take fork of ERPnext and then build custom app?
    In this way, I can build my custom app and the push changes to my github repository and take a pull on server to install my customapp. But in this way, how will take patches from ERPnext and merge them in my branch?

  2. Should I clone ERPnext repository and have my own branch maintained in my local for developing the custom app without ever pushing that to ERPnext repository and then as updates come I can merge hotfix branch with my own branch ?

I need some guide on this.

Also, if I am building my Custom app and pushed on server with some features/ DocTypes and later if developed more code and pushed on server, how to tell frappe to install only newDoctypes and migrate only those tables to database?

Where is the guide for all these things in ERPNext?

1 Like

@Abhiraj_Tulsyan your new app is not a clone of erpnext app so you don’t fork or clone . your create your app using bench new-app app_name. then you push your new app repository to your own github . then you start creating your doctype /overrides …etc on your custom app and keep the github updated . to install your app to another server you use bench get-app and bench install-app .

1 Like

Hello @bahaou. I get that my new will not be new clone. I got that. I am asking how to upgrade new bench updates when I have my custom app installed?

Also one more thing, suppose I changed a website setting, so I should change it through my custom app? or should I directly change on ERPnext source code and then push it to github?

I have one doubt which I’ll explain.

Suppose I want to change something in ERPNext lets say hide some module, hide some settings. And do some changes which reflect changes in databases.

But now I want this new changed source code to be deployable along with change in databases so how to achieve that?

For eg I installed ERPnext on my local, I changed some settings which added custom fields in Table X lets say.

Now I want this change in database to be recorded somewhere so that I can push this change to all my ERPNext website running on different servers for my clients. How to achieve that??

@Abhiraj_Tulsyan bench update will work just fine if you have custom app and it will update all new erpnext features .
if you need to change any doctype in erpnext you use customize form . then you export the customization in your app through command bench-export (you have to add the custom field fixtures in hooks file) , then customization will be saved in your custom app.
don’t change in default doctype with ‘edit doctype’ don’t edit core file or nothing . everything you need to change will be stored in your custom app

1 Like

So you saying, whatever I am changing in doc-type related to ERPnext like Sales Invoice / Payroll module etc can be exported to my custom app as a setting?

1 Like

@bahaou
Okay what about if I edit out some field in the database? What if I edit out somethings which are stored by default in ERPnext and edit those field out in the database? Will that changes can also be exported or only changes related to DocTypes?

For example if I change "powered by ERPnext’ to “powered by XYZ” in footer in website settings, can that edit field also be exported?

@Abhiraj_Tulsyan , This setting is avaialbe in Database now. whatever you change it will save in database.

in V15 go to >> Website Setting > Footer

Thanks.

@Abhiraj_Tulsyan you can export anything . that’s why custom apps existed in the first place . doctypes , python overrides , js , html , css , database data … everything can be exported to the custom app .

1 Like

A comprehensive answer:

1 Like