title: Raise warning or error message when user inputing employee that is already exist (Odoo)
body: <p>How do I to prevent users inputing employee that is already exist like in this picture :
  <a href="https://i.stack.imgur.com/PF9sa.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PF9sa.jpg" alt="here"></a></p>
  
  <p>So when the users are trying to input same employee that already exist, it will raise warning or error messages</p>
  
  <p>I've made this function :</p>
  
  <pre><code>class overtime(models.Model):
      _name = 'overtime.overtime'
  
      employee_ids = fields.One2many('overtime.overtime_details', 'overtime_id', string="Employee", readonly=True, states={'draft': [('readonly', False)]})
  
  class overtime_details(models.Model):
      _name='overtime.overtime_details'
  
       @api.multi
       @api.constrains('employee_id')
       @api.onchange('employee_id')
       def prevent_duplicate(self):
          #import pdb;pdb.set_trace()
          if self.employee_id:
              bruh = self.search([])
              for empy in bruh:
                  if self.employee_id.id == empy.employee_id.id:
                      raise osv.except_osv(_('Error!'),_('You Cant Enter Same Employee in One Overtime Request!'))
  
       nik = fields.Char('NIK', size=250, required=True)
       overtime_id = fields.Many2one('overtime.overtime', string="Overtime", ondelete='cascade')
       job_id = fields.Many2one('hr.job', string="Position", readonly=True)
       employee_id = fields.Many2one('hr.employee', "Employee", required=True, select=True, copy=False
                      , domain="[('department_id', '=', parent.department_id)]")
       ovrtm = fields.Float(compute=attd_check, string='Overtime Hour(s)')
       ttalmtp = fields.Float(compute=overtype_count, string='Total Multiplier')
  </code></pre>
  
  <p>but it loop every record that ive saved in the database, so i need help what should i do, if i want to loop record that ive input in that session? iam working on odoo v8</p>