跳至內容
選單
此問題已被標幟
1 回覆
8168 瀏覽次數

Hello All,

I created the custom module,in that I want to create the combo box and values for the combo box should come from the database.

Please help me on this.

頭像
捨棄
最佳答案

OpenERP/Odoo is a framework that do almost all the hard work in the behind and developer just do some definitions and arrangements. One of the things that this framework that do on behalf of  the developer is to create combo boxes. You just need to define the field that needs to be a combo box on the view as a many2one. 

Check, for example, the customer field on the sales order screen:

 'partner_id': fields.many2one('res.partner', 'Customer', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, required=True, change_default=True, select=True, track_visibility='always'), 


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
11月 16
4749
2
5月 25
561
0
3月 25
675
2
12月 21
2420
0
12月 18
2083