Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
3065 Visualizzazioni

Hi all,

I'm trying to create a list where the user can choose from a set of options (like in field = selectable), but with the added option for the user to create a new one if it's needed.

Any ideas on how to accomplish this easily?

Alex.

Avatar
Abbandona
Risposta migliore

Hello Alex,

Just create new model with name (single) field and put m2o field and keep option enable(create and edit) in lookpup(by default its enabled)  so user can select or create as per choice. 

Avatar
Abbandona
Risposta migliore

Hello Alex,

you can use following structure for selection field in odoo

my_selection_field = fields.Selection([('option1', 'Label 1'), ('option2', 'Label 2')], string='My Selection Field')

Regards,

Ankit Vaghela

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
3
mag 25
726
1
apr 25
571
3
set 24
12601
2
feb 24
1689
1
lug 23
1896