mirror of
https://github.com/frappe/erpnext.git
synced 2025-12-03 18:35:36 +00:00
Page:
Guide to splitting modules from ERPNext
Pages
"Expense or Difference account is mandatory for [YOUR ITEM HERE] as it impacts overall stock value"
Adding Custom Form to Website
Agri Farm ERPNext
Agri Farm ERPNext Documentation
Agri Farm ERPNext Proposed Doc
Agri farm ERPNext PR git primer
AgriNext Mockups
Apache HTTP Settings for Mac OS
Bank Transaction Management : Feature Specification (v0.1)
Cascading Pull Requests
Code Editing Tools
Code Security Guidelines
Coding Standards
Community Contributions
Community Developed Custom Scripts
Community Release Manager
Contribution Guidelines
Contribution Issues
Country wise Chart of Accounts
Create User Stories
Delivery Note Modern Legacy Print Format
Delivery Note Spartan Legacy Print Format
Designing Integrations
Documentation To Do
E Commerce Features List
ERPNext Performance Tuning
ERPNext Release Note v8.1
ERPNext Upgrade to Version 5
ERPNext Version 8
ERPNext for Import Export Business( Logistics Module)
ERPNext for Non Profits
Export Custom field using export fixtures
Feature Suggestions
Form Design Guidelines
Future Development: Tracking Productivity
Guide to splitting modules from ERPNext
Home
How To Make Regional Contributions
How to Install ERPNext Version 3
How to contribute ERPNext documentation[WIP]
How to test a Pull Request
Hub Code Sprint
Improve Precision of Stock Valuation
Install ERPNext on Debian based systems
Install ERPNext on RedHat based systems
Integrating Emails in ERPNext
Issue Guidelines
Legacy Print Formats (Category)
Manufacturing Module Community
Migrating your erpnext instance to wsgi
Migration Guide To ERPNext Version 16
Migration Guide to ERPNext version 14
Migration Guide to ERPNext version 15
Model Design Guidelines
Module Maintainers
MySQL configuration file
Naming Guidelines
Page format for ERPNext docs
Preparing a Contribution Proposal
Project Module Community
Pull Request Checklist
Purchase Order Classic Legacy Print Format
Purchase Order Modern Legacy Print Format
Purchase Order Spartan Legacy Print Format
Quotation Classic Legacy Print Format
Quotation Modern Legacy Print Format
Quotation Spartan Legacy Print Format
Restoring From ERPNext Backup
Sales Invoice Classic Legacy Print Format
Sales Invoice Modern Legacy Print Format
Sales Invoice Spartan Legacy Print Format
Sales Order Classic Legacy Print Format
Sales Order Modern Legacy Print Format
Setting up Backup Manager
Setting up TLS SSL certificates Let's Encrypt for ERPNext sites
Some Useful Aliases
Standard Print Header Code
Standard Release Test Plan
Standard With Columns Print Format
Supported Versions
Test Checklists
Troubleshooting Guide Template
Ubuntu HA Cluster with lsyncd, remote MariaDB, Apache Reverse Proxy Setup Guide
Updating ERPNext Instance
VSCode Debugging for Frappe Python
Version 4 Permission Use Cases
Version 5 Release Notes
Version 7 Release Notes
Version 7.1 Release Notes
WSGI Production Deployment
[Specifications] Hash chaining of sales and payment transactions in ERPNext
_sidebar
school
Clone
10
Guide to splitting modules from ERPNext
Anand Baburajan edited this page 2023-08-09 18:18:55 +05:30
Table of Contents
Recently we have observed a need for splitting some modules from ERPNext monolith into separate app for various reasons. This article serves as guide for that transition.
We have created a short video tutorial regarding this. You can watch it here.
Before Splitting
- Plan the splitting of module at least 1 month ahead of next major release. We should give ample time to users to plan any activities that are required for migration like installing the app, which is a manual process on central.
- Update documentation about deprecation and app installation process.
Splitting
- Create a new app using bench.
- Extract the module into a seperate repo using git-filter-repo.
- Use this new app and merge it with the previously extracted module.
- Migrate translations, if any, using the migrate-translations command, like:
bench --site kina migrate-translations erpnext lending. - Remove module specific code from ERPNext repo.
- If there is any module specific code that is spread across other modules, clean it up and move to appropriate place in the new repo.
- Setup hooks.py file to run it as an app in ERPNext.
- Create a new readme file with detailed description of the app.
- Add warning in Frappe/ERPNext that's visible to end user in current version. A bootstrap alert is good enough in most cases. Example.
- Add a warning for sysadmins by making an empty patch that just prints warning about module deprecation / removal. You can add more info about migration or make this conditional based on usage. Example 1, Example 2.
- [IMPORTANT] Add a patch in new app for migrating existing data, wherever required.
- Each domain/module will have its own setup. In this, new records, custom fields, forms etc might have been created if required. Make sure to remove those records. This can be accomplished by writing a patch.
- Drop all doctypes, releated patches from
developbranch. Make sure to trace and remove any imports that are present in other files. - Ensure that PR conveys the breaking change.
After Splitting
- Release notes for next major version should have "BREAKING CHANGES" section first with all the module removals.
- Publish it as an app in FC marketplace.
- Setup test data so that test suite can pass.
- Setup a CI system similar to Frappe/ERPNext so you can be sure that your app is in installable and usable state at all times. This will be slightly different from Frappe or ERPNext as your app will depend on both of them. Reference CI for app that depends on ERPNext
- Test the app with & without the module and make sure migrations happen smoothly.