[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.
This commit is contained in:
Thibault Delavallée
2019-01-14 15:22:18 +00:00
parent a8a6729eed
commit 812d1ec0ee
@@ -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