Openbravo开发-开发篇 加字段到屏幕的tab中

本文介绍在ADempiere系统中配置三种类型的输入组件:Textfield文本输入框、Combo-boxfield下拉框(固定选项)及Referencefield下拉框(从数据库获取选项)。涉及数据库字段的创建、屏幕布局的调整、引用表的选择等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

下面解释三种类型
Text field(输入框)
Combo-box field(下拉框,指定固定值)
Reference field(下拉框,从库表中取)
一、Text field
1)加field到数据库中(见以前章节)
ALTER TABLE m_warehouse
ADD COLUMN em_ht_contact_info varchar(255);
2)加column 到屏幕中
Go to [b]Application Dictionary > Windows, Tabs and Fields[/b] in the application, and search for the Warehouse window (it's name is: Warehouse and Storage Bins).
Double click the Warehouse window record.
Then click on the Tab in the top.
Double click the warehouse tab record.
Now you are on the Tab view, in the bottom of this view there is a button 'Create Fields'. Click this button.
修改显示次序,GRID中的次序
使用Synchronize Terminology生成element,在Application Dictionary > Setup > Element中修改LABEL内容
3)导出数据库
ant export.database
4)发布
ant smartbuild
二、Combo-box field
1)在 AD_Reference 里加 需要的下拉内容
在validation type 中选择 list validation.
在list validation tab中填写内容
剩下步骤与text field一样,在加column 到table时选择
Set a description and help text.
Set reference to list.
Set the Reference Search Key to the reference record created earlier, CB_Location_Type(这个就是上面在AD_Reference中的名字).
三、Reference field
参考上面章节
不一样的地方有两个
1)加字段时要增加约束
ALTER TABLE m_warehouse
ADD COLUMN EM_HT_Shipping_Company varchar(32);
ALTER TABLE m_warehouse
ADD COLUMN EM_HT_Business_Partner varchar(32);
ALTER TABLE m_warehouse
ADD CONSTRAINT em_ht_shipping_company FOREIGN KEY (em_ht_shipping_company)
REFERENCES m_shipper (m_shipper_id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION; ALTER TABLE m_warehouse
ADD CONSTRAINT em_ht_business_partner FOREIGN KEY (em_ht_business_partner)
REFERENCES c_bpartner (c_bpartner_id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION;
2)加AD_Reference里选择table validation
在table tab中选择表名等
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值