How can I do for a field became dependent on two other fields?

I want that the realtor_type field be required only if active and realtor 
are checked.

I did this, but it didn't work.

STATES_REALTOR = {
    'readonly': ~Eval('active', True),
    'readonly': ~Eval('realtor', True),
}
DEPENDS_REALTOR = ['active', 'realtor']

    realtor_type = fields.Selection([
        ("1", "xxx"),
        ("2", "yyy"),
        (None, '')],
        'Realtor Type',
        required=False,
        states=STATES_REALTOR, depends=DEPENDS_REALTOR)

Reply via email to