Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2592 Weergaven

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
Annuleer
Beste antwoord

Hello 

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

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
aug. 17
7033
1
sep. 23
3893
1
sep. 23
2589
2
jun. 18
4783
2
jun. 23
4862