Custom DocTypes & data
Purpose
Section titled “Purpose”Explain where schema lives for the handover team (ERD-style documentation is often generated separately in draw.io).
Generated DocType reference (field tables)
Section titled “Generated DocType reference (field tables)”Category pages and per–DocType field tables are generated from JSON in the app package. Start here:
- DocType reference (generated) — incorporation, accounting, CRM, finance/Xero, automation, payroll, AGM, time tracking, platform.
Regenerate after schema changes:
cd docs && npm run generate:doctypesScope in codebase
Section titled “Scope in codebase”leekimerp/**/doctype/*/*.json— DocType JSON (fields, permissions, links)leekimerp/fixtures/— fixture definitions andclient_script.json
Design principles (typical Frappe)
Section titled “Design principles (typical Frappe)”- Naming:
namefield often autoincrement or hash per DocType settings — not necessarily UUID v4 as in some generic ERP templates; verify per DocType. - Soft delete:
docstatusand cancelled documents in ERPNext; customis_activewhere used. - Audit: Standard
owner,creation,modified,modified_byon documents. - Foreign keys: Implemented as Link fields; referential behavior follows Frappe rules.
Attach draw.io / PNG from your DB design package to your formal handover; this site links concepts only.
Operational notes
Section titled “Operational notes”- Migrations:
patches.txtandmigrate.py(after_migrateinhooks.py)
Known gaps
Section titled “Known gaps”- Field tables are generated; business process and ERPNext integration paragraphs on each page are placeholders — fill in by domain experts.