Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
2887 Tampilan

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
Buang
Jawaban Terbai

Hello 

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

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Agu 17
7326
1
Sep 23
4204
1
Sep 23
3047
2
Jun 18
5165
2
Jun 23
5239