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 can i create dropdown box in openerp?

By
sateesh
on 1/22/14, 2:08 AM 3,288 views

about dropdown box

2
shashank verma
On 1/22/14, 2:27 AM

Hi satish U can do this in 2ways by using selection field and many2one field. By using selection field u can create your own options in list menu. To access option list from other table use many2one.

In .py file

my_item:fields.selection((('pendrive','pendrive'),('fan','fan'),('lamp','lamp')),'My Items')

erp_item:field.many2one(product.product)

In xml file

<field name="my_item" widget="selection/"> <field name="erp_item" widget="selection/">

Remember widget is mandatory for man2one if u want to use it as a drop down list.

0
Dr Obx
On 4/5/15, 5:49 PM

Dropdown box is simple but create a many2one is a little bit more complicated. That's what i'm looking for :)


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

0 follower(s)

Stats

Asked: 1/22/14, 2:08 AM
Seen: 3288 times
Last updated: 5/20/16, 12:24 PM