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:
Hi,
how can i add a dropdown list in xml file
i use odoo 8
thanks
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')
Hi,
thanks for your answer, i use windows 7 machine, were can i write this ?
in your models file
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
AanmeldenGerelateerde posts | Antwoorden | Weergaven | Activiteit | |
---|---|---|---|---|
|
0
mei 23
|
1543 | ||
Button in Odoo
Opgelost
|
|
2
jan. 20
|
5667 | |
|
1
dec. 16
|
4089 | ||
|
1
dec. 15
|
5863 | ||
|
3
okt. 15
|
18544 |