Hi,
how can i add a dropdown list in xml file
i use odoo 8
thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
x = fields.Many2one(model_name, string)
In view
<field name="x"/>
This will give the dropdown on view with create and edit option of the related model and display the rec_name of each entries. If you need the pure selection list as a widget selection with the field.
<field name="x" widget="selection"/>
These are the params we use while creating many2one field.
Many2one field in comodel_name (string)False)Next is you can use the Selection.
here you can specify values directly as a key value pair.
x = fields.Selection([
('normal', 'In Progress'),
('done', 'Ready for next stage'),
('blocked', 'Blocked')], string='State')
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký| Bài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
|---|---|---|---|---|
|
0
thg 5 23
|
2566 | |||
|
Button in Odoo
Đã xử lý
|
2
thg 1 20
|
6542 | ||
|
1
thg 12 16
|
5650 | |||
|
1
thg 12 15
|
7546 | |||
|
3
thg 10 15
|
19962 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.