Tags

,


.py

def onchange_get_business_type(self, cr, uid, ids, event_type, context=None):
    result = {
        'business_type': False
    }
    event_ids = self.pool.get('event.type').search(cr, uid, [('id', '=', event_type)],context=context)
    event_obj = self.pool.get('event.type').browse(cr, uid, event_ids, context=context)
    result['business_type'] = event_obj.business_type
    return {'value':  result}

 

.xml

<field name="event_type" on_change="onchange_get_business_type(event_type)"/>
Advertisements