Odoo. Hide some options in field selection

I have some selection field in my model. Here example:

class MyModel(models.Model):
    _name = 'my_app.my_model'

    example_selection = fields.Selection(
        [
             ('first', 'First'),
             ('second', 'Second'),
             # etc.
        ], 
        string='My selection', 
    )

In some cases I need hide specific options in selection(or radio buttons). How I can do this properly?

Below screen from base calendar module which can more explain about my problem.

enter image description here

Thanks in advance.

108 thoughts on “Odoo. Hide some options in field selection”

Leave a Comment