A powerful Frappe app that automatically transforms text case across your entire Frappe/ERPNext system based on global settings.
- Global Text Transformation: Automatically converts text in ALL documents across your Frappe site
- Multiple Case Styles: 7 different transformation options
- Easy Control: Enable/disable from Global Defaults with one click
- Smart Filtering: Safely skips system doctypes to prevent conflicts
- Real-time Preview: Test transformations before applying
- Works Everywhere: Customer, Item, Sales Invoice, Purchase Order, and all custom doctypes
| Style | Example |
|---|---|
| Sentence case | Hello world. This is second sentence. |
| lowercase | hello world |
| UPPERCASE | HELLO WORLD |
| Capitalize Each Word | Hello World |
| tOGGLE cASE | hELLO wORLD |
| camelCase | helloWorld |
| PascalCase | HelloWorld |
- Frappe Framework v13+ or ERPNext
- Python 3.6+
-
Navigate to your bench directory
cd /path/to/your/bench -
Download the app
bench get-app https://github.com/tbocloud/change_case_pro.git
-
Install on your site
bench --site your-site-name install-app change_case_pro
-
Restart and clear cache
bench restart bench clear-cache
- Go to Global Defaults in your Frappe desk
- Check "Enable Change Case" β
- Select your preferred Case Style (e.g., "UPPERCASE")
- Save the settings
Now every text field in every document will automatically transform based on your settings when saved.
Before enabling Change Case:
- Customer Name:
john smith enterprises
After enabling "UPPERCASE" style:
- Customer Name:
JOHN SMITH ENTERPRISESβ¨
Use the "Preview Case" button in Global Defaults to test how text will be transformed before applying it system-wide.
The app automatically adds these fields to your Global Defaults:
| Field | Type | Description |
|---|---|---|
| Enable Change Case | Check | Master switch to enable/disable case transformation |
| Case Style | Select | Choose from 7 different case transformation styles |
The transformation applies to these field types:
- Data
- Small Text
- Text
- Text Editor
- Long Text
- Markdown Editor
These fields are automatically skipped to maintain system integrity:
- System fields (
name,owner,modified_by, etc.) - Critical doctypes (DocType, Custom Field, etc.)
- Fields starting with underscore (
_user_tags, etc.)
# Test the transformation function
from change_case.events import change_case
result = change_case("hello world", "UPPERCASE")
print(result) # Output: HELLO WORLD- Create a new Customer with lowercase name
- Save the document
- Verify the name is transformed according to your Global Defaults setting
change_case/
βββ hooks.py # App configuration and hook registration
βββ events.py # Core transformation logic
βββ install.py # Installation and setup scripts
βββ change_case.js # Frontend JavaScript for Global Defaults
βββ patches.py # Utility functions for troubleshooting
βββ README.md # This documentation
-
Check if enabled:
defaults = frappe.get_single("Global Defaults") print(f"Enabled: {defaults.enable_change_case}") print(f"Style: {defaults.sentence_case}")
-
Verify hooks are registered:
hooks = frappe.get_hooks() print("change_case.events.apply_global_case" in hooks.get("before_save", []))
-
Restart bench:
bench restart bench clear-cache
If custom fields aren't created automatically, run:
from change_case.install import create_custom_fields
create_custom_fields()- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues)
- Email: sammish.thundiyil@gmail.com
- Built for the Frappe Framework community
- Inspired by the need for consistent text formatting across business documents
- Thanks to all contributors and testers
Made with β€οΈ for the Frappe community
β Star this repo if it helped you!