Updated Guide to splitting modules from ERPNext (markdown)

Chillar Anand
2022-02-17 15:26:06 +05:30
parent a2bca6fb8d
commit f96aa2f09a

@@ -2,13 +2,13 @@ Recently we have observed a need for splitting some modules from ERPNext monolit
## Checklist
1. 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.
2. Update documentation about deprecation and app installation process.
3. Add warning in Frappe/ERPNext that's visible to end user in current version. A bootstrap alert is good enough in most cases. [Example](https://github.com/frappe/erpnext/pull/26701/files#diff-6e5f2e554463c4ef6ca859ea4a1375a58c27f7762da855c53b756f0ceca63eefR22-R23).
4. 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](https://github.com/frappe/frappe/blob/develop/frappe/patches/v14_0/drop_data_import_legacy.py), [Example 2](https://github.com/frappe/erpnext/blob/develop/erpnext/patches/v13_0/shopify_deprecation_warning.py).
5. [IMPORTANT] Add a patch in new app for migrating existing data, wherever required.
6. If there are any custom fields in the module, make sure to remove these fields in the patch.
7. Drop all doctypes, releated patches from `develop` branch. Make sure to trace and remove any imports that are present in other files. Ensure that PR conveys the breaking change.
- 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.
- Add warning in Frappe/ERPNext that's visible to end user in current version. A bootstrap alert is good enough in most cases. [Example](https://github.com/frappe/erpnext/pull/26701/files#diff-6e5f2e554463c4ef6ca859ea4a1375a58c27f7762da855c53b756f0ceca63eefR22-R23).
- 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](https://github.com/frappe/frappe/blob/develop/frappe/patches/v14_0/drop_data_import_legacy.py), [Example 2](https://github.com/frappe/erpnext/blob/develop/erpnext/patches/v13_0/shopify_deprecation_warning.py).
- [IMPORTANT] Add a patch in new app for migrating existing data, wherever required.
- If there are any custom fields in the module, make sure to remove these fields in the patch.
- Drop all doctypes, releated patches from `develop` branch. Make sure to trace and remove any imports that are present in other files. Ensure that PR conveys the breaking change.
8. Release notes for next major version should have "BREAKING CHANGES" section first with all the module removals.