一个 DocType 总是归属于某个模块,以便于对相关模型进行分组管理。
Frappe 自带了许多内置模块。例如:
- Core(核心)- 包含 DocType、DocField、Report、System Settings 等 DocType
- Desk(工作台)- 包含 ToDo、Event、Note、Kanban Board 等 DocType
- Email(邮件)- 包含 Email Account、Newsletter、Email Group 等 DocType
模块还有助于将代码文件按目录进行分组。由 DocType 生成的控制器文件
会存放在其对应的模块目录中。
frappe
├── commands
├── config
├── core
│ ├── doctype
│ │ ├── doctype
│ │ ├── docfield
│ │ ├── report
│ │ ├── system_settings
│ │ ├── ...
│ │ └── ...
│ ├── page
│ ├── report
│ └── web_form
├── desk
│ ├── doctype
│ │ ├── ...
│ │ ├── event
│ │ ├── kanban_board
│ │ ├── note
│ │ └── todo
│ ├── form
│ ├── page