Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
2622 Vues

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
Ignorer
Meilleure réponse

Hello 

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

Avatar
Ignorer
Publications associées Réponses Vues Activité
2
août 17
7065
1
sept. 23
3913
1
sept. 23
2638
2
juin 18
4818
2
juin 23
4891