天天看点

Openbravo开发-开发篇 建立一个新模型

三步

1)注册

2)开发

3)发布

注册,填写DB Prefix、Data Package信息

From the Application menu, select Application Dictionary || Module

DB Prefix:at least one db prefix is required when a module also contains database artifacts (table, column, constraints, etc.). Openbravo ERP determines the module of a database artifact by checking to see if its name starts with one of the defined db_prefixes. As other howto's in the developers guide will add database artifacts, let's specify at least one DB prefix.

For more information see the AD_Module_Dbprefix table description.

Data Package: Tables are linked to a module through the Data Package. The generated business object for the new table will use the Java Package defined in the Data Package. Other howto's in the developers guide will add new tables so there is a need to specify a data package as illustrated in the image below.

开发,三种方式

Direct: for example a Window is directly related to a specific module.

Indirect: a table belongs to a data package which again belongs to a module.

By name: a new stored procedure is linked through a module by prefixing it with the DB_Prefix of the module.

发布

1从数据库导出

ant export.database

2打包

ant package.module -Dmodule=org.openbravo.howtos

3安装

Log in as System Administrator.

From the Application menu, select Application Dictionary || Application || Module Management.

Select the module you want and click Install Now.

Follow the on-screen instruction to rebuild the application and restart the Tomcat server.