Skip to content

Custom DocTypes & data

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:

Regenerate after schema changes:

Terminal window
cd docs && npm run generate:doctypes
  • leekimerp/**/doctype/*/*.json — DocType JSON (fields, permissions, links)
  • leekimerp/fixtures/ — fixture definitions and client_script.json
  • Naming: name field often autoincrement or hash per DocType settings — not necessarily UUID v4 as in some generic ERP templates; verify per DocType.
  • Soft delete: docstatus and cancelled documents in ERPNext; custom is_active where used.
  • Audit: Standard owner, creation, modified, modified_by on 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.

  • Migrations: patches.txt and migrate.py (after_migrate in hooks.py)
  • Field tables are generated; business process and ERPNext integration paragraphs on each page are placeholders — fill in by domain experts.