zoukankan      html  css  js  c++  java
  • How to Create Screen/Window in ADempiere

    1 – Create database table by executing your script. For example:

    CREATE TABLE "ITC_EMPLOYEE"
    ( "ITC_EMPLOYEE_ID" NUMBER(10,2) NOT NULL ENABLE,
    "NAME" VARCHAR2(50) NOT NULL ENABLE,
    "FATHERNAME" VARCHAR2(50),
    "AD_CLIENT_ID" NUMBER(10,0) NOT NULL ENABLE,
    "AD_ORG_ID" NUMBER(10,0) NOT NULL ENABLE,
    "ISACTIVE" CHAR(1) DEFAULT 'Y' NOT NULL ENABLE,
    "CREATED" DATE DEFAULT SYSDATE NOT NULL ENABLE,
    "CREATEDBY" NUMBER(10,0) NOT NULL ENABLE,
    "UPDATED" DATE DEFAULT SYSDATE NOT NULL ENABLE,
    "UPDATEDBY" NUMBER(10,0) NOT NULL ENABLE,
    CONSTRAINT "ITC_EMPLOYEE_PK" PRIMARY KEY ("ITC_EMPLOYEE_ID") ENABLE
    );

    Following are the important point about database table:

    • It is better to create primary-key (PK). The PK name should be: [table name] + “_ID” and type should be NUMBER if you want to leverage with full ADempiere AD features.
    • Along with PK there should be 7 other fields: •AD_CLIENT_ID •AD_ORG_ID •ISACTIVE •CREATED •CREATEDBY•UPDATED •UPDATEDBY


    2 – Activating the new table in the AD
    Now we have to import that new table in ADempiere - here we again call it a Table :)

    • · Login as System administrator in ADempiere. The user id and password is: SuperUser/System
    • · Open ‘Table and Column’ window
    • · Create a new record
    • · Type into DB Table Name, the name of the newly created DB-table i.e ITC_EMPLOYEE
    • · Set ‘Data Access Level’ to ‘All’ and check the item ‘Maintain Change Log’
    • · Click on the button Create Columns from DB.

    o This creates for each db-tablecolumn a corresponding AD Column.
    o Check the automatic created Columns, especially the ID references (e.g. Number instead of Integer)


    Now you can say that we have a physical database table that we created in step 1 & and we have an ADempiere logical table created in Step 2. First one is DB table and second one is AD table.

    3 –Create an ADempiere window

    • · Create a new entry in the ‘Window Tab & Field’ with the name ITC_EMPLOYEE . In the next tab i.e. ‘Tab’ create a new entry with the name EMPLOYEE and select ‘ITC_EMPLOYEE’ as it's table.
    • · Use the button ‘Create Fields’ to create fields for all columns of the table. In the tab ‘Field Sequence’ you can choose the sequence of the fields in the new window and in the tab ‘Field’ you can select some view-related attributes. Set the read-only flag for ‘ITC_EMPLOYEE _ID’ (the id should be unchangeable).
    • · To change the display properties (read-only, displayed or mandatory) of any fields see Display properties of columns and fields for more details.

    4 – Create a MENU and attach your window with it. It's for your exercise.

  • 相关阅读:
    iOS Reachability检测网络状态
    开始运行命令大全
    IBM-x3650做RAID5更换硬盘后rebuild步骤分享
    使用VMware Converter Standalone Client进行虚拟机 P2V提示 权限不足,无法连接\ipadmin$的解决方法集锦
    共享文件夹 帐号密码正确,却一直提示输入帐号密码的解决办法
    Cisco 关闭命令同步提示信息
    EtherChannel(PAgP、LACP)基本配置--端口聚合--(转)
    Cisco Port-Channel 设置(链路聚合--重点)
    SQL Server 2008作业失败无法确定所有者是否有服务器访问权限
    windows server 2003 远程桌面最大连接数调整与windows 2008远程桌面后,本地帐号自动锁定
  • 原文地址:https://www.cnblogs.com/eastson/p/2631620.html
Copyright © 2011-2022 走看看