コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2637 ビュー

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.

アバター
破棄
最善の回答

Hello 

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

アバター
破棄
関連投稿 返信 ビュー 活動
2
8月 17
7077
1
9月 23
3965
1
9月 23
2681
2
6月 18
4846
2
6月 23
4900