Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
8165 Tampilan

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.

Avatar
Buang
Jawaban Terbai

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'), 


Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Nov 16
4747
2
Mei 25
557
0
Mar 25
674
2
Des 21
2418
0
Des 18
2083