Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
3006 Vistas

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
Descartar
Mejor respuesta

Hello 

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

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
ago 17
7481
1
sept 23
4365
1
sept 23
3275
2
jun 18
5306
2
jun 23
5411