[FIX] hr_recruitment: allow users to create applications

After 9ddfc18b41
an user with recruitment/officer (user) permission on hr_recruitment
could not create applications anymore because doing so imply a write to
hr.recruitment.stage

opw-2305646

closes odoo/odoo#55222

X-original-commit: b8359c55e6e57035ffa3b10bfa5294e22a74e837
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
Andrea Grazioso (agr-odoo)
2020-07-30 15:43:33 +00:00
parent 876b77af2c
commit 6fd1855f37
@@ -149,9 +149,9 @@ class Applicant(models.Model):
('done', 'Green'),
('blocked', 'Red')], string='Kanban State',
copy=False, default='normal', required=True)
legend_blocked = fields.Char(related='stage_id.legend_blocked', string='Kanban Blocked', readonly=False)
legend_done = fields.Char(related='stage_id.legend_done', string='Kanban Valid', readonly=False)
legend_normal = fields.Char(related='stage_id.legend_normal', string='Kanban Ongoing', readonly=False)
legend_blocked = fields.Char(related='stage_id.legend_blocked', string='Kanban Blocked', readonly=False, related_sudo=True)
legend_done = fields.Char(related='stage_id.legend_done', string='Kanban Valid', readonly=False, related_sudo=True)
legend_normal = fields.Char(related='stage_id.legend_normal', string='Kanban Ongoing', readonly=False, related_sudo=True)
application_count = fields.Integer(compute='_compute_application_count', help='Applications with the same email')
meeting_count = fields.Integer(compute='_compute_meeting_count', help='Meeting Count')
refuse_reason_id = fields.Many2one('hr.applicant.refuse.reason', string='Refuse Reason', tracking=True)