添加功能
This commit is contained in:
@@ -187,6 +187,13 @@ class YuthonOnboardApproval(models.Model):
|
||||
marital = 'married'
|
||||
|
||||
resource_calendar_id = self.env['resource.calendar'].search([('company_id', '=', self.company_id.id)], limit=1)
|
||||
|
||||
if self.phone:
|
||||
exist_emp = self.env['hr.employee'].search([
|
||||
('mobile_phone', '=', self.phone)
|
||||
], limit=1)
|
||||
if exist_emp:
|
||||
raise UserError("该手机号已存在员工档案,请勿重复创建!")
|
||||
employee_id = self.env['hr.employee'].create({'name': self.information_form_id.staff_name,
|
||||
'birthday': login_id.date_birth,
|
||||
'company_id': self.company_id.id,
|
||||
|
||||
Reference in New Issue
Block a user