Naming conventions for Tables in Openbravo

1. The Name of the Document shoould be in camel case and also should begin with the module's prefix and should not include blank spaces (REST web services cannot be created) .
Eg. The table c_orderline can be written as "C_OrderLine"

2. Description is a must and the name can be used if the description is unknown.

3. Better to inculde help/comments that will help for further reference.

4. The java table name should always be in lowercase. (since postgres is not case sensitive its better to use lower case)

5. The view option should be selected only for read only tables. These tables cannot be accessed through a web-service as POST methods will be invalid on those tables.

6. The java class name should also be camel cased.

7. Data access level should be set accordingly.
* System only: Only system records can be inserted into this table (AD_CLIENT_ID=0, AD_ORG_ID=0), for example AD_TABLE.
* System/Client: System or client specific records can be inserted here (AD_CLIENT_ID=anything, AD_ORG_ID=0), for example AD_ROLE
* Organization: Only client and organization specific data can be inserted into this table (AD_CLIENT_ID<>0, AD_ORG_ID<>0), for example C_INVOICE
* Client/Organization: Only client specific data can be inserted here, however, it can belong to a specific organizations within that client or be shared among
all (AD_CLIENT_ID<>0, AD_ORG_ID=anything), for example C_BPARTNER
* All: Any combination of AD_CLIENT_ID and AD_ORG_ID can be inserted into this table.

For further technical doubts regarding table creation in Openbravo refer


Popular posts from this blog

Changing Timezone in Postgresql, Ubuntu

My 10 years in Application Development

Dissecting Openbravo 3.0 UI Architecture