[IMP] hr_recruitment: Avoid partner duplication
Use the application form partner as work contact when converting him into and employee. Use the employee work contact as user partner on user creation. The goal is to have only 1 partner over the whole recruitment process flow, instead of three, thus reducing the confusion for end users who don't really know who to choose. TaskID: 3101400
This commit is contained in:
@@ -193,6 +193,7 @@ class HrEmployeePrivate(models.Model):
|
||||
'default_phone': self.work_phone,
|
||||
'default_mobile': self.mobile_phone,
|
||||
'default_login': self.work_email,
|
||||
'default_partner_id': self.work_contact_id.id,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -586,6 +586,7 @@ class Applicant(models.Model):
|
||||
address_sudo = self.env['res.partner'].sudo().browse(address_id)
|
||||
return {
|
||||
'name': self.partner_name or self.partner_id.display_name,
|
||||
'work_contact_id': self.partner_id.id,
|
||||
'job_id': self.job_id.id,
|
||||
'job_title': self.job_id.name,
|
||||
'private_street': address_sudo.street,
|
||||
|
||||
Reference in New Issue
Block a user