@api.multi
def _check_auto_confirmation(self):
    res = super(EventRegistration, self)._check_auto_confirmation()
    if res:
        orders = self.env['sale.order'].search([('state', '=', 'draft'), ('id', 'in', self.mapped('sale_order_id').ids)], limit=1)
        if orders:
            res = False
    return res
@api.multi
def _check_auto_confirmation(self):
    res = super(EventRegistration, self)._check_auto_confirmation()
    if res:
        orders = self.env['sale.order'].search([('state', '=', 'draft'), ('id', 'in', self.mapped('sale_order_id').ids)], limit=1)
        if orders:
            res = False
    return res