Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2549 Zobrazení

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
Zrušit
Nejlepší odpověď

Hello 

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
srp 17
6971
1
zář 23
3864
1
zář 23
2544
2
čvn 18
4739
2
čvn 23
4806