Create a custom document class
From iDempiere en
A "document" in iDempiere is an application concept that is very useful. Many of iDempiere's built in functions use documents for its implementation. Examples of documents are:
- Invoices
- Shipments
- Inventory moves/adjustments
- Payments
What makes documents special from other entities (such as business partners / products) are that they have a document status.
The document status enables the documents to be in a workflow and be in different statuses.
This concept is very powerful and the possibility to create new custom documents makes iDempiere even more powerful and flexible.
Steps to create a new custom document
- Create a new Model (will be explained more in detail)
- Except for the other mandatory fields the model must contain the following fields
- C_DocType_ID numeric(10,0) NOT NULL DEFAULT 0::numeric
- C_DocTypeTarget_ID numeric(10,0) NOT NULL DEFAULT 0::numeric
- DocAction character varying(2) NOT NULL DEFAULT 'CO'::bpchar
- DocStatus character varying(2) NOT NULL DEFAULT 'DR'::character varying
- DocumentNo character varying(30) NOT NULL
- processed character(1) DEFAULT 'N'::bpchar
- processing character(1) DEFAULT 'N'::bpchar
- isapproved character(1) NOT NULL DEFAULT 'Y'::bpchar
- Generate the model class
- The model class must implement DocAction.
