About DocTypes ​

A DocType is the definition of one kind of document in ERPNext. Sales Order, Item, Customer, and Stock Entry are all DocTypes. ERPNext runs on the Frappe Framework, and every Frappe app is built from DocTypes.

What a DocType defines ​

A DocType holds everything that ERPNext needs to know about one kind of document:

  • Fields: the data that each document stores, with a field type for each field. Read the field types reference.
  • Layout: how the fields appear on the form, in tabs, sections, and columns.
  • Naming: how each new document gets its ID, for example a naming series such as SO-2026-00001.
  • Permissions: which roles can read, create, submit, or cancel the documents.
  • Settings: for example, whether ERPNext tracks changes, or whether the document can be submitted.

From this definition, ERPNext builds a database table, a form, a list, a report view, and an API for the DocType. When you add a field to a DocType, it appears in all of these.

Kinds of DocType ​

KindSettingWhat it meansExample
Standard-Many documents, each with its own ID.Customer
SubmittableIs SubmittableDocuments go from draft to submitted to cancelled. A submitted document cannot change.Sales Invoice
Child tableIs Child TableRows of a table inside another document. It has no list of its own.Sales Invoice Item
SingleIs SingleOnly one document exists. Settings pages are singles.Selling Settings
TreeIs TreeDocuments form a hierarchy of groups and children.Item Group, Account

Standard and custom DocTypes ​

ERPNext and other apps ship standard DocTypes. You cannot change a standard DocType directly. You change it with Customize Form, which stores your changes separately, so that they survive upgrades.

You can also create your own DocType for data that ERPNext does not cover. ERPNext marks it as Custom?.