A lightweight Frappe app that cleanly backports the Role Replication functionality from Frappe PR #26845 into Frappe version 15 without modifying core framework code. Ideal for production environments needing latest features and long-term maintainability.
- ✅ Designed for Frappe v15
- 🚫 Not tested on older versions
- 🛡️ Patch is idempotent — skips itself if already merged upstream
- Creates a new doctype Role Replication
- Backports upstream functionality with minimal overhead
- Ships with
.patch
and patch applier logic - Clean, production-safe — core files untouched
- Auto-applies at migration, then gracefully exits if patch is no longer needed
Replace
mysite
with your actual site name
- Clone the app into your bench:
cd ~/frappe-bench bench get-app https://github.com/Tariquaf/role_replication.git
- Install the app on your site:
cd ~/frappe-bench bench --site mysite install-app role_replication
- Run the patch and apply migration:
bench update --patch bench --site mysite migrate
This app uses a simple but powerful after_migrate hook to apply the upstream role replication patch:
- The patch from Frappe commit f06f30b64f lives at role_replication/patches/role_replication.patch
- The hook runner in role_replication/patches/apply_role_replication.py checks if the patch applies cleanly, and applies it to apps/frappe
- If the patch is already present (e.g. merged in upstream), the hook gracefully skips No core repo pollution. No Git cherry-pick gymnastics. Just results.