Odoo Help

Welcome!

This community 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.

1

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

By
yogesh
on 3/19/15, 7:28 AM 659 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.

0

Tarek Mohamed Ibrahim

--Tarek Mohamed Ibrahim--
896
| 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.

https://www.linkedin.com/profile/public-profile-settings?trk=prof-edit-edit-public_profile

tibrahim@2p.com.sa

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


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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