Skip to Content
Menú
This question has been flagged
1 Respondre
2516 Vistes

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
Descartar
Best Answer

Hello 

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

Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
d’ag. 17
6932
1
de set. 23
3799
1
de set. 23
2485
2
de juny 18
4719
2
de juny 23
4741