Files
odoo_source/addons/hr_recruitment/models/ir_ui_menu.py
T
sofiagvaladze 3faad0a7a0 [IMP] hr_recruitment(_skills/_survey): grant interviewer more rights
Purpose: In order to increase visibility of the interviewer group,
it is moved from hidden group, to recruitment group.

Moreover, we grant the interviewer additional rights in order to manage
the application process properly and be able to execute following actions
• Send an interview
• Check interview results
• Add/delete/modify skills
• Create a meeting

In order to allow above mentioned actions on skills to the interviewer,
we grant them all the rights to the hr_applicant_skill.

In order to let the interviewer send the survey we grant them access to
the private addresses and now recruitment-interviewer implies
survey-officer group as well.

Additionally, for the security purposes, we make a change, so that
the survey officer is not able to read recruitment interview results
unless they are also an interviewer for a specific applicant.

task - 3179332

closes odoo/odoo#118897

Related: odoo/enterprise#40696
Related: odoo/upgrade#4624
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-27 17:33:02 +02:00

17 lines
702 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class IrUiMenu(models.Model):
_inherit = 'ir.ui.menu'
def _load_menus_blacklist(self):
res = super()._load_menus_blacklist()
if self.env.user.has_group('hr_recruitment.group_hr_recruitment_interviewer') and not self.env.user.has_group('hr_recruitment.group_hr_recruitment_user'):
res.append(self.env.ref('hr_recruitment.menu_hr_job_position').id)
elif self.env.user.has_group('hr_recruitment.group_hr_recruitment_user'):
res.append(self.env.ref('hr_recruitment.menu_hr_job_position_interviewer').id)
return res