Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2630 Visualizzazioni

I have a selection field as follows:


source = fields.Selection([
('one', 'First'),
('two', 'Second'),
('three', 'Third'),
('four', 'Fourth'),
('five', 'Fifth'),
], required=True, default='one')


How can I show but inactive some of these options?


at the moment these options are all visible and selectable but I want some to be visible but inactive so not being selectable.

Avatar
Abbandona
Risposta migliore

Hello 

you can not inactive but based on your condition you can add and remove using fields_view_get method

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
ago 17
7072
1
set 23
3942
1
set 23
2659
2
giu 18
4830
2
giu 23
4895