Adding custom behaviour to default ERPNext apps

I just started with ERPNext. I Went through Frappe tutorial and set up my server.

What I need to do is start customizing ERPNext default apps to add or override some functionality to suite our needs.

For example we need to add some country specific accounting functionality and make changes to manufacturing etc.

Let’s say that I want to change ERPNext default app behaviour. Add DocType fields, some calculations when creating these fields. Change some default buttons functionality, like adding additional checks or doing some extra steps etc. Adding new buttons.

Our goal is that when ERPNext is updated then our custom changes would work with these new updates. We would like to make changes in the way that they can be added to clean ERPnext install without importing database.

How should I start extending ERPNext default apps?
Should I make new custom app and define hooks there and using $ bench --site mysite export-fixtures to ensure DocType custom fields to be created when this custom app is installed?
But what about buttons, and button logic changes etc.

What is recommended way of overriding ERPNext default app logic and adding logic to default app in a way that it survives ERPNext updates. Like inheriting most of the functionality and UI logic but adding and overriding (extending) some functionality and UI behaviour.

I am looking for big picture here.

Overriding default behaviour in custom apps comes at a cost of surviving ERPNext updates.

The general idea is that if the changes you are making are generic and can be used by other people as well, it should go into the core.

This has a few benefits:

  1. Your code gets reviewed and tested by the community and core team members.
  2. Your code gets maintained by the core team. No worries on updates.

Maybe you can start a thread, where we can discuss the features you are looking to build, and based on the community interest, start its development.

1 Like