Odoo Help


How to add combo box in a custom module and the values for combo box should come from database?

on 3/19/15, 7:28 AM 1,633 views

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.


Tarek Mohamed Ibrahim

--Tarek Mohamed Ibrahim--
| 5 3 7
Gîza, Egypt
--Tarek Mohamed Ibrahim--

I am an old VFP developer on ERP

I have moved to 2p since Nov-2014 and started developing with Python on Odoo.



Tarek Mohamed Ibrahim
On 9/20/15, 4:30 PM

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

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 3/19/15, 7:28 AM
Seen: 1633 times
Last updated: 9/20/15, 4:30 PM