تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
8145 أدوات العرض

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
نوفمبر 16
4740
2
مايو 25
538
0
مارس 25
661
2
ديسمبر 21
2403
0
ديسمبر 18
2083