Customization on top of existing Project Module in ERPNext to support NPD (New Product Development) process in a manufacturing company.
- Part-Based Task Management: Link tasks to specific parts (items) within a project
- Iteration Support: Track multiple iterations of development for each part
- Automatic Task Generation: Generate 18 sequential NPD tasks for each part and iteration
- Task Dependencies: Enforce sequential task completion within iterations
- Matrix Reports: Visualize part-stage completion status across iterations
- Project Templates: Use "NPD Template" to define task sequences
- Frappe Framework installed
- ERPNext installed
- Bench CLI configured
cd $PATH_TO_YOUR_BENCH
bench get-app $URL_OF_THIS_REPO --branch developbench --site [your-site] install-app npd_project_moduleExample:
bench --site development.localhost install-app npd_project_moduleAfter installation, verify that:
-
Custom Fields Created:
- Task doctype:
part_number,iteration_number - Project doctype:
part_numbers(child table) - Item doctype:
project
- Task doctype:
-
NPD Template Created:
- Go to: Project > Project Template
- Look for "NPD Template" with 18 tasks
-
Report Available:
- Go to: Reports > Part Stage Matrix
The installation is idempotent, meaning:
- ✅ You can run installation multiple times without errors
- ✅ Existing custom fields won't be duplicated
- ✅ The app checks for existing resources before creating them
- ✅ NPD Template is only created/updated if needed
Test idempotency:
# Run installation multiple times
bench --site [your-site] install-app npd_project_module
bench --site [your-site] install-app npd_project_module # Should show "already installed"Before uninstalling, backup your site:
bench --site [your-site] backup --with-filesbench --site [your-site] uninstall-app npd_project_module --yes --no-backupExample:
bench --site development.localhost uninstall-app npd_project_module --yes --no-backupNote: Use --no-backup only if you're sure you don't need a backup. For production, always backup first.
After uninstallation, verify that:
- ✅ Custom fields removed from Task, Project, and Item doctypes
- ✅ NPD Template removed
- ✅ Part Stage Matrix report removed
- ✅ Project Part Number doctype removed
- ✅ No broken references or orphaned data
The uninstallation process removes:
-
Custom Fields:
- Task:
part_number,iteration_number - Project:
part_numbers_section,part_numbers - Item:
project
- Task:
-
Templates:
- Project Template: "NPD Template" (and its template tasks)
-
Reports:
- Part Stage Matrix report
-
DocTypes:
- Project Part Number (child table)
-
Hooks:
- All registered hooks are automatically removed by Frappe
- Remove all custom fields and their data
- Remove the Project Part Number child table and its data
- Remove NPD Template and template tasks
- Remove custom reports
Important: If you have existing projects with part numbers and tasks, uninstalling will remove this data. Always backup your site before uninstalling.
If custom fields don't appear after installation:
-
Clear cache:
bench --site [your-site] clear-cache
-
Reload the page in browser (Ctrl+Shift+R or Cmd+Shift+R)
-
Check custom fields:
- Go to: Setup > Customize Form
- Select "Task" doctype - Look for "Part Number" and "Iteration Number" fields
- Select "Item" doctype - Look for "Project" field
If installation fails:
- Check the error message in terminal
- Ensure ERPNext is installed:
bench --site [your-site] list-apps - Check Frappe version compatibility
- Review logs:
bench --site [your-site] logs
If uninstallation fails:
- Check the error message in terminal
- Manually remove custom fields if needed:
- Go to: Setup > Customize Form
- Remove custom fields manually
- Check for dependencies:
- Ensure no active projects are using the custom fields
- Remove or update dependent configurations
If NPD Template is not created:
- Check if template already exists with a different name
- Run template creation manually:
Then in console:
bench --site [your-site] console
from npd_project_module.install.after_install import create_npd_template create_npd_template() frappe.db.commit()
After uninstallation, you can reinstall the app:
bench --site [your-site] install-app npd_project_moduleThe reinstallation will:
- ✅ Create all custom fields again
- ✅ Create NPD Template again
- ✅ Set up all configurations
Note: Any data that was removed during uninstallation will not be restored.
This app uses pre-commit for code formatting and linting. Please install pre-commit and enable it for this repository:
cd apps/npd_project_module
pre-commit installPre-commit is configured to use the following tools for checking and formatting your code:
- ruff
- eslint
- prettier
- pyupgrade
mit