跳至內容
選單
此問題已被標幟
1 回覆
2617 瀏覽次數

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
7059
1
9月 23
3911
1
9月 23
2631
2
6月 18
4814
2
6月 23
4882