[IMP] hr_recruitment: refine user access to job positions view

Previously, a user could be a recruiter but not an interviewer. With the
new changes, the recruiter role is also an interviewer. On the job
positions kanban view, the functionality of the "X to Recruit" link
depended on whether a user was an interviewer or not. Now, since an
admin is also an interviewer, they only have interviewer access and can
only see the application list, which is not desired. In this commit,
we've changed the condition from being an interviewer to being a
recruiter. Consequently, the admin can navigate to the job position
edit form while interviewers only see the application list. Users with
neither role won't see the kanban view at all, so there's no concern
regarding that.

closes odoo/odoo#138628

Task: #3471557
X-original-commit: 06712c3a2c34ece2dc1b93180a270da46e7e5966
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
Sina Chaichi Maleki (cmsi)
2023-10-13 14:14:00 +00:00
committed by Yannick Tivisse
parent 4c0a5ed445
commit 6357e6dd3a
+2 -2
View File
@@ -100,10 +100,10 @@
</div>
<ul class="col-5 o_job_activities">
<li>
<a name="edit_job" type="edit" t-attf-class="{{ record.no_of_recruitment.raw_value > 0 ? 'to-recruit' : 'text-secondary' }}" groups="!hr_recruitment.group_hr_recruitment_interviewer">
<a name="edit_job" type="edit" t-attf-class="{{ record.no_of_recruitment.raw_value > 0 ? 'to-recruit' : 'text-secondary' }}" groups="hr_recruitment.group_hr_recruitment_user">
<field name="no_of_recruitment"/> To Recruit
</a>
<span t-attf-class="{{ record.no_of_recruitment.raw_value > 0 ? 'to-recruit' : 'text-secondary' }}" groups="hr_recruitment.group_hr_recruitment_interviewer">
<span t-attf-class="{{ record.no_of_recruitment.raw_value > 0 ? 'to-recruit' : 'text-secondary' }}" groups="!hr_recruitment.group_hr_recruitment_user">
<field name="no_of_recruitment"/> To Recruit
</span>
</li>