@api.onchange('event_type_id')
def _onchange_type(self):
    super(Event, self)._onchange_type()
    if self.event_type_id.use_ticketing:
        self.event_ticket_ids = ([(5, 0, 0)] + [(0, 0, {'name': ((self.name and (_('Registration for %s') % self.name)) or ticket.name), 'product_id': ticket.product_id.id, 'price': ticket.price}) for ticket in self.event_type_id.event_ticket_ids])
@api.onchange('event_type_id')
def _onchange_type(self):
    super(Event, self)._onchange_type()
    if self.event_type_id.use_ticketing:
        self.event_ticket_ids = ([(5, 0, 0)] + [(0, 0, {'name': ((self.name and (_('Registration for %s') % self.name)) or ticket.name), 'product_id': ticket.product_id.id, 'price': ticket.price}) for ticket in self.event_type_id.event_ticket_ids])