Search code examples
gitversion-controlerpnextfrappe

Is there any way to version control ERPNext customizations?


We have a laravel application that we integrated ERPNext to via API calls.

We added some customizations to our ERPNext production environment to go with the changes we made to our laravel application. Thing is, we have version control for our laravel application, but not for our ERPNext instance. So most of the time we just target the production ERPNext while on dev since we only retrieve data via API for now. But now that we implemented features that would POST/UPDATE to Erpnext, we can't (and shouldn't) do that anymore. How would one version control (via git) an ERPNext instance or app?

Changes that we made to our ERPNext

  • New DocTypes
  • Custom Fields in existing DocTypes
  • Custom Scripts that are targeted by API endpoints or ran by some other events like updating a record.

Solution

  • You can always git fork ERPNext, make changes in that fork and deploy that fork for production purpose. In git its simple to keep the fork up to date, at least for critical fixes or perhaps periodically.

    But based in your listed changes, perhaps having a separate APP is a better way to go. That keeps all your changes together and simplifies upgrades on both sides, your code and erpnext.

    The frappe framework as well as erpnext has many ways to extract your logic (hooks, customization of doctypes with fixtures, overrides in python or javascript), altough sometime it needs patient research to figure out the best way.