From 812d1ec0eeb2d28941b7f622ee9e0fc557b037d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 19 Dec 2018 13:07:42 +0000 Subject: [PATCH] [FIX] hr_recruitment_survey: set related survey readonly on applicant Otherwise you might change the survey used on the job without knowing it. Survey on applicant is just there for information / action purpose, not configure the job itself. This commit is linked to task ID 1911586 and PR #28986. --- addons/hr_recruitment_survey/models/hr_applicant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_recruitment_survey/models/hr_applicant.py b/addons/hr_recruitment_survey/models/hr_applicant.py index 46fb9445da0..bd784622dc1 100644 --- a/addons/hr_recruitment_survey/models/hr_applicant.py +++ b/addons/hr_recruitment_survey/models/hr_applicant.py @@ -6,7 +6,7 @@ from odoo import api, fields, models class Applicant(models.Model): _inherit = "hr.applicant" - survey_id = fields.Many2one('survey.survey', related='job_id.survey_id', string="Survey", readonly=False) + survey_id = fields.Many2one('survey.survey', related='job_id.survey_id', string="Survey", readonly=True) response_id = fields.Many2one('survey.user_input', "Response", ondelete="set null", oldname="response") @api.multi