summaryrefslogtreecommitdiff
path: root/addons/hr_recruitment
diff options
context:
space:
mode:
authorAdrien Widart <awt@odoo.com>2020-11-19 08:14:13 +0000
committerAdrien Widart <awt@odoo.com>2020-11-19 08:34:49 +0000
commitb7deda4185e3c240c3c30c9a570dc7173f9d8aa3 (patch)
tree4c664a3181e406bc018ac004eba7d1d37f879b40 /addons/hr_recruitment
parent0b138ffa5a1b2b03f03fb5dc51994a3bfc4e5dea (diff)
[FIX] hr_recruitment: set job recruiter on applicantion recruiter
If a job position has a default recruiter, when applying for this job, the application's recruiter is not the correct one. To reproduce the error: (Need hr_recruitment,website_hr_recruitment) 1. Go to Recruitment > Configuration > Job Positions 2. Create a new one - Fill in the Recruiter field 3. Save it 4. Click on "Go to Website" 5. Publish the job position - Top bar: click on "Unpublished" 6. Log out 7. Go back on the job position page 8. Apply 9. Log in 10. Open the Recruitment module 11. Check the applications for the job position => The application is created, but the associated recruiter is not the one previously set (step 2 above). This fix makes sure an application has the correct recruiter when the associated job position recruiter is defined. OPW-2387888 closes odoo/odoo#61979 Signed-off-by: adwid <adwid@users.noreply.github.com>
Diffstat (limited to 'addons/hr_recruitment')
-rw-r--r--addons/hr_recruitment/models/hr_recruitment.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/hr_recruitment/models/hr_recruitment.py b/addons/hr_recruitment/models/hr_recruitment.py
index bb7b0dd475c..4878a5e9a76 100644
--- a/addons/hr_recruitment/models/hr_recruitment.py
+++ b/addons/hr_recruitment/models/hr_recruitment.py
@@ -115,7 +115,7 @@ class Applicant(models.Model):
company_id = fields.Many2one('res.company', "Company", compute='_compute_company', store=True, readonly=False, tracking=True)
user_id = fields.Many2one(
'res.users', "Recruiter", compute='_compute_user',
- tracking=True, default=lambda self: self.env.uid, store=True, readonly=False)
+ tracking=True, store=True, readonly=False)
date_closed = fields.Datetime("Closed", compute='_compute_date_closed', store=True, index=True)
date_open = fields.Datetime("Assigned", readonly=True, index=True)
date_last_stage_update = fields.Datetime("Last Stage Update", index=True, default=fields.Datetime.now)