title: How to use drop down field in OpenERP?
body: <p>I have been trying to use a drop down menu list in my openerp module. I have a many2one field containing categories . This field is associated with an onchange function. This onchange function is returning new values to 2nd field. Now everything is working ok but I want to use a dropdown type menu in the 2nd field so that I can select the values from it. My Python code is as follows:</p>
  
  <pre><code>class deg_form(osv.osv):
         _name = "deg.form"
         _columns = {
               'categ1':fields.many2one('product.category','Parent Category',required=True),
               'my_products':fields.char('Product',size=64)
                    }
  
         def Product_Category_OnChange(self,cr,uid,ids,categ1):
             pro_id=[]
             cr.execute('select id,name from product_template where  categ_id in (select id from product_category where parent_id in (select id from product_category where parent_id='+str(categ1)+'))  union select id,name from product_template where  categ_id in (select id from product_category where parent_id='+str(categ1)+') union select id,name from product_template where categ_id='+str(categ1))
             res = cr.fetchall()
             for pid,name in res:
                  pro_id.append((pid,name))
             return {'value':{'my_products':pro_id}}
  </code></pre>
  
  <p>here is my xml:</p>
  
  <pre><code> &lt;field name="categ1" on_change="Product_Category_OnChange(categ1)" /&gt;
  </code></pre>
  
  <p>My values are filtered but are all displayed on the field separated by commas. I want them to be listed as dropdown . I used many2one but the values didont seem to be filtered. Therefore I am having problems achieving my values as dropdown list view. Please help me.
  Regards </p>