[FIX] hr_recruitment: fix the issue where the phone number is not copied

When an employee is created from a signed application, the phone number or the mobile number was not copied to the employee private information.

Now, the phone number is copied and if not present, the mobile number is copied.

closes odoo/odoo#157055

Task: 3659409
X-original-commit: cd1fc0bc7e3c8206e8e9e70f5f255f9c4f2b47eb
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
Arthur Pierrot
2024-03-12 08:15:41 +00:00
committed by Yannick Tivisse
parent 53d6d795dd
commit 277645ab19
@@ -687,6 +687,7 @@ class Applicant(models.Model):
'work_email': self.department_id.company_id.email or self.email_from, # To have a valid email address by default
'work_phone': self.department_id.company_id.phone,
'applicant_id': self.ids,
'private_phone': self.partner_phone or self.partner_mobile
}
def _update_employee_from_applicant(self):