RECRUITMENT Changes and Fixes

This commit is contained in:
Pranay 2025-03-25 10:58:32 +05:30
parent d85cf4822b
commit 5e0995fb87
14 changed files with 264 additions and 51 deletions

View File

@ -27,6 +27,7 @@
'data/cron.xml',
'data/sequence.xml',
'data/mail_template.xml',
'views/job_category.xml',
'views/hr_location.xml',
'views/stages.xml',
'views/hr_applicant_views.xml',

View File

@ -4,7 +4,7 @@
<record id="template_recruitment_deadline_alert" model="mail.template">
<field name="name">Recruitment Deadline Alert</field>
<field name="model_id" ref="model_hr_job_recruitment"/>
<field name="email_from">{{ object.company_id.email or user.email_formatted }}</field>
<field name="email_from">{{ object.company.email or user.email_formatted }}</field>
<field name="email_to">{{ object.user_id.email }}</field>
<field name="subject">Reminder: Recruitment Process Ending Soon - {{ object.job_id.name }}</field>
<field name="description">

View File

@ -5,6 +5,7 @@ from dateutil.relativedelta import relativedelta
from datetime import datetime
from odoo.exceptions import ValidationError
import warnings
class HRApplicant(models.Model):
@ -122,7 +123,11 @@ class HRApplicant(models.Model):
for rec in self:
submitted_count = len(self.sudo().search([('id','!=',rec.id),('submitted_to_client','=',True)]).ids)
if submitted_count >= rec.hr_job_recruitment.no_of_eligible_submissions:
raise ValidationError(_("Max no of submissions for this JD has been reached"))
warnings.warn(
"Max no of submissions for this JD has been reached",
DeprecationWarning,
stacklevel=2,
)
rec.submitted_to_client = True
rec.client_submission_date = fields.Datetime.now()

View File

@ -8,6 +8,9 @@ class HRJob(models.Model):
help='Number of new employees you expect to recruit.', default=1, compute="_compute_no_of_recruitment")
hr_job_recruitments = fields.One2many('hr.job.recruitment', 'job_id', string='Recruitments')
job_category = fields.Many2one("job.category", string="Category")
company_id = fields.Many2one( exportable=False)
alias_id = fields.Many2one(exportable=False)
@api.depends('hr_job_recruitments')
def _compute_no_of_recruitment(self):

View File

@ -98,13 +98,6 @@ class HRJobRecruitment(models.Model):
else:
return self.env.company.partner_id
@api.onchange('job_id')
def onchange_job_id(self):
for rec in self:
if rec.job_id and not rec.description:
rec.description = rec.job_id.description
job_id = fields.Many2one('hr.job', required=True)
name = fields.Char(string='Job Position', required=True, index='trigram', translate=True, related='job_id.name')
@ -115,7 +108,7 @@ class HRJobRecruitment(models.Model):
secondary_skill_ids = fields.Many2many('hr.skill', "hr_job_recruitment_hr_skill_rel",
'job_recruitment_id', 'hr_skill_id', "Secondary Skills")
no_of_recruitment = fields.Integer(string='Target', copy=False,
no_of_recruitment = fields.Integer(string='Number of Positions', copy=False,
help='Number of new employees you expect to recruit.', default=1)
@ -143,7 +136,7 @@ class HRJobRecruitment(models.Model):
help='Expected number of employees for this job position after new recruitment.')
no_of_employee = fields.Integer(compute='_compute_employees', string="Current Number of Employees", store=True,
help='Number of employees currently occupying this job position.')
company_id = fields.Many2one('res.company', string='Company', default=lambda self: self.env.company)
company_id = fields.Many2one('res.company', string='Company', default=lambda self: self.env.company, exportable=False)
contract_type_id = fields.Many2one('hr.contract.type', string='Employment Type')
# active = fields.Boolean(default=True)
user_id = fields.Many2one('res.users', "Recruiter",
@ -156,7 +149,7 @@ class HRJobRecruitment(models.Model):
address_id = fields.Many2one(
'res.partner', "Job Location", default=_default_address_id,
domain="[('is_company','=',True),('contact_type','=',recruitment_type)]",
help="Select the location where the applicant will work. Addresses listed here are defined on the company's contact information.")
help="Select the location where the applicant will work. Addresses listed here are defined on the company's contact information.", exportable=False)
recruitment_type = fields.Selection([('internal','Internal'),('external','External')], required=True, default='internal')
requested_by = fields.Many2one('res.partner', string="Requested By",
default=lambda self: self.env.user.partner_id, domain="[('contact_type','=',recruitment_type)]")
@ -204,6 +197,23 @@ class HRJobRecruitment(models.Model):
experience = fields.Many2one('candidate.experience', string="Experience")
budget = fields.Char(string='Budget')
job_category = fields.Many2one("job.category", string="Category")
@api.onchange('job_id','job_category')
def onchange_job_id(self):
for rec in self:
if rec.job_id and not rec.description:
rec.description = rec.job_id.description
if rec.job_id and rec.job_id.job_category:
rec.job_category = rec.job_id.job_category.id
if rec.job_category and rec.job_category.default_user:
rec.user_id = rec.job_category.default_user.id
@api.depends('application_ids.submitted_to_client')
def _compute_no_of_submissions(self):
counts = dict(self.env['hr.applicant']._read_group(

View File

@ -415,3 +415,11 @@ class Location(models.Model):
# else:
# rec.hired = False
#
class RecruitmentCategory(models.Model):
_name = 'job.category'
_rec_name = "category_name"
category_name = fields.Char(string="Category Name")
default_user = fields.Many2one('res.users')

View File

@ -1,11 +1,22 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_hr_location,hr.location,model_hr_location,base.group_user,1,1,1,1
access_hr_job_recruitment_user,access.hr.job.recruitment.user,model_hr_job_recruitment,base.group_user,1,1,1,1
access_candidate_experience,access.candidate.experience.user,model_candidate_experience,base.group_user,1,1,1,1
access_job_category_user,job.category.user,model_job_category,base.group_user,1,0,0,0
access_job_category_manager,job.category.manager,model_job_category,hr_recruitment.group_hr_recruitment_user,1,1,1,1
access_hr_job_recruitment_user,access.hr.job.recruitment.user,model_hr_job_recruitment,base.group_user,1,1,0,0
access_hr_job_recruitment_manager,access.hr.job.recruitment.manager,model_hr_job_recruitment,hr_recruitment.group_hr_recruitment_user,1,1,1,1
hr_recruitment.access_hr_candidate_interviewer,hr.candidate.interviewer,hr_recruitment.model_hr_candidate,hr_recruitment.group_hr_recruitment_interviewer,1,1,1,0
access_candidate_experience,access.candidate.experience.manager,model_candidate_experience,hr_recruitment.group_hr_recruitment_user,1,1,1,1
access_candidate_experience_user,access.candidate.experience.user,model_candidate_experience,base.group_user,1,0,0,0
access_recruitment_attachments_user,access.recruitment.attachments.user,model_recruitment_attachments,base.group_user,1,1,1,1
access_post_onboarding_attachment_wizard,access.post.onboarding.attachment.wizard,model_post_onboarding_attachment_wizard,base.group_user,1,1,1,1
access_employee_recruitment_attachments,employee.recruitment.attachments,model_employee_recruitment_attachments,base.group_user,1,1,1,1
access_employee_recruitment_attachments,employee.recruitment.attachments,model_employee_recruitment_attachments,base.group_user,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_hr_location hr.location model_hr_location base.group_user 1 1 1 1
3 access_hr_job_recruitment_user access_job_category_user access.hr.job.recruitment.user job.category.user model_hr_job_recruitment model_job_category base.group_user 1 1 0 1 0 1 0
access_candidate_experience access.candidate.experience.user model_candidate_experience base.group_user 1 1 1 1
4 access_recruitment_attachments_user access_job_category_manager access.recruitment.attachments.user job.category.manager model_recruitment_attachments model_job_category base.group_user hr_recruitment.group_hr_recruitment_user 1 1 1 1
5 access_post_onboarding_attachment_wizard access_hr_job_recruitment_user access.post.onboarding.attachment.wizard access.hr.job.recruitment.user model_post_onboarding_attachment_wizard model_hr_job_recruitment base.group_user 1 1 1 0 1 0
6 access_hr_job_recruitment_manager access.hr.job.recruitment.manager model_hr_job_recruitment hr_recruitment.group_hr_recruitment_user 1 1 1 1
7 hr_recruitment.access_hr_candidate_interviewer hr.candidate.interviewer hr_recruitment.model_hr_candidate hr_recruitment.group_hr_recruitment_interviewer 1 1 1 0
8 access_candidate_experience access.candidate.experience.manager model_candidate_experience hr_recruitment.group_hr_recruitment_user 1 1 1 1
9 access_candidate_experience_user access.candidate.experience.user model_candidate_experience base.group_user 1 0 0 0
10 access_recruitment_attachments_user access.recruitment.attachments.user model_recruitment_attachments base.group_user 1 1 1 1
11 access_post_onboarding_attachment_wizard access.post.onboarding.attachment.wizard model_post_onboarding_attachment_wizard base.group_user 1 1 1 1
12 access_employee_recruitment_attachments employee.recruitment.attachments model_employee_recruitment_attachments base.group_user 1 1 1 1
13
14
15
16
17
18
19
20
21
22

View File

@ -22,6 +22,7 @@
</function>
<record id="hr_recruitment_skills.hr_applicant_skill_interviewer_rule" model="ir.rule">
<field name="name">Applicant Skill: Interviewer</field>
<field name="active" eval="False"/>
<field name="domain_force">[
'|',
('candidate_id.applicant_ids.hr_job_recruitment.interviewer_ids', 'in', user.id),
@ -78,18 +79,36 @@
<record id="hr_applicant_recruitment_interviewer_rule" model="ir.rule">
<field name="name">Applicant Interviewer</field>
<field name="name">Edit/Create Own Applicants</field>
<field name="model_id" ref="model_hr_applicant"/>
<field name="domain_force">[
'|',
('hr_job_recruitment.interviewer_ids', 'in', user.id),
('interviewer_ids', 'in', user.id),
]</field>
<field name="perm_create" eval="False"/>
<field name="perm_create" eval="True"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4, ref('hr_recruitment.group_hr_recruitment_interviewer'))]"/>
</record>
<record id="hr_applicant_recruitment_interviewer_rule2" model="ir.rule">
<field name="name">Read all Applicants</field>
<field name="model_id" ref="model_hr_applicant"/>
<field name="domain_force">[
'|',
('hr_job_recruitment.interviewer_ids', 'not in', user.id),
('interviewer_ids', 'not in', user.id),
]</field>
<field name="perm_read" eval="True"/>
<field name="perm_create" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4, ref('hr_recruitment.group_hr_recruitment_interviewer'))]"/>
</record>
<record id="hr_candidate_recruitment_interviewer_rule" model="ir.rule">
<field name="name">Candidate Interviewer</field>
<field name="model_id" ref="model_hr_candidate"/>
@ -98,8 +117,76 @@
('applicant_ids.hr_job_recruitment.interviewer_ids', 'in', user.id),
('applicant_ids.interviewer_ids', 'in', user.id),
]</field>
<field name="perm_create" eval="False"/>
<field name="active" eval="False"/>
<field name="perm_create" eval="True"/>
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4, ref('hr_recruitment.group_hr_recruitment_interviewer'))]"/>
</record>
<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value eval="[('module', '=', 'hr_recruitment'), ('name','=','hr_candidate_interviewer_rule')] "/>
</function>
<value eval=" {'noupdate': False} "/>
</function>
<record id="hr_recruitment.hr_candidate_interviewer_rule" model="ir.rule">
<field name="active" eval="False"/>
</record>
<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value eval="[('module', '=', 'hr_recruitment'), ('name','=','hr_applicant_interviewer_rule')] "/>
</function>
<value eval=" {'noupdate': False} "/>
</function>
<record id="hr_recruitment.hr_applicant_interviewer_rule" model="ir.rule">
<field name="active" eval="False"/>
</record>
<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value eval="[('module', '=', 'hr'), ('name','=','hr_job_comp_rule')] "/>
</function>
<value eval=" {'noupdate': False} "/>
</function>
<record id="hr.hr_job_comp_rule" model="ir.rule">
<field name="active" eval="False"/>
</record>
<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value eval="[('module', '=', 'hr_recruitment'), ('name','=','hr_job_user_rule')] "/>
</function>
<value eval=" {'noupdate': False} "/>
</function>
<record id="hr_recruitment.hr_job_user_rule" model="ir.rule">
<field name="active" eval="False"/>
</record>
<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value eval="[('module', '=', 'hr_recruitment'), ('name','=','hr_job_user_rule')] "/>
</function>
<value eval=" {'noupdate': False} "/>
</function>
<record id="hr_recruitment.hr_job_user_rule" model="ir.rule">
<field name="active" eval="False"/>
</record>
<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value eval="[('module', '=', 'website_hr_recruitment'), ('name','=','hr_job_officer')] "/>
</function>
<value eval=" {'noupdate': False} "/>
</function>
<record id="website_hr_recruitment.hr_job_officer" model="ir.rule">
<field name="active" eval="False"/>
</record>
</odoo>

View File

@ -35,6 +35,6 @@
name="Experience"
parent="hr_recruitment.menu_hr_recruitment_config_applications"
action="action_candidate_experience"
groups="base.group_no_one"
groups="hr_recruitment.group_hr_recruitment_user"
sequence="30"/>
</odoo>

View File

@ -7,9 +7,14 @@
<field name="inherit_id" ref="hr_recruitment.hr_applicant_view_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='archive_applicant']" position="before">
<button string="Submit" name="submit_for_approval" type="object" class="oe_stat_button" invisible="not approval_required or application_submitted" groups="base.group_user" />
<button string="Approve" name="approve_applicant" type="object" class="oe_stat_button" invisible="not approval_required or not application_submitted" groups="hr_recruitment.group_hr_recruitment_user" />
<button name="submit_to_client" string="Send to Client" type="object" class="btn-primary" groups="hr_recruitment.group_hr_recruitment_user" invisible="submitted_to_client or application_status in ['refused']"/>
<button string="Submit" name="submit_for_approval" type="object" class="oe_stat_button"
invisible="not approval_required or application_submitted" groups="base.group_user"/>
<button string="Approve" name="approve_applicant" type="object" class="oe_stat_button"
invisible="not approval_required or not application_submitted"
groups="hr_recruitment.group_hr_recruitment_user"/>
<button name="submit_to_client" string="Send to Client" type="object" class="btn-primary"
groups="hr_recruitment.group_hr_recruitment_user"
invisible="submitted_to_client or application_status in ['refused']"/>
</xpath>
<xpath expr="//field[@name='kanban_state']" position="after">
<div class="o_employee_avatar m-0 p-0">
@ -17,6 +22,7 @@
options="{&quot;zoom&quot;: true, &quot;preview_image&quot;:&quot;candidate_image&quot;}"/>
</div>
<widget name="web_ribbon" title="Awaiting Approval" bg_color="text-bg-warning" invisible="not approval_required or not application_submitted"/>
</xpath>
<xpath expr="//field[@name='job_id']" position="before">
@ -39,7 +45,8 @@
</xpath>
<xpath expr="//field[@name='stage_id']" position="before">
<field name="recruitment_stage_id" widget="statusbar_duration"
options="{'clickable': '1', 'fold_field': 'fold'}" invisible="not active and not employee_id" readonly="approval_required" force_save="1"/>
options="{'clickable': '1', 'fold_field': 'fold'}" invisible="not active and not employee_id"
readonly="approval_required" force_save="1"/>
</xpath>
<!-- <xpath expr="//form" position="after">-->
<!-- </xpath>-->
@ -109,6 +116,10 @@
<xpath expr="//search/field[@name='job_id']" position="after">
<field name="hr_job_recruitment"/>
<field name="recruitment_stage_id" domain="[]"/>
<field name="approval_required"/>
</xpath>
<xpath expr="//filter[@name='my_applications']" position="after">
<filter name="to_approve" string="To Approve" domain="[('approval_required', '=', True),('application_submitted', '=', True)]"/>
</xpath>
<xpath expr="//search/group" position="inside">
<filter string="Job Recruitment" name="job_recruitment" domain="[]"
@ -213,13 +224,13 @@
</field>
</record>
<record model="ir.actions.act_window" id="action_hr_applicant_new_job_recruitment">
<record model="ir.actions.act_window" id="action_hr_applicant_new_job_recruitment">
<field name="res_model">hr.applicant</field>
<field name="view_mode">form</field>
<field name="context">{'default_hr_job_recruitment': active_id}</field>
</record>
<record id="action_hr_recruitment_report_filtered_job_recruitment" model="ir.actions.act_window">
<record id="action_hr_recruitment_report_filtered_job_recruitment" model="ir.actions.act_window">
<field name="name">Recruitment Analysis</field>
<field name="res_model">hr.applicant</field>
<field name="view_mode">graph,pivot</field>
@ -237,24 +248,11 @@
</record>
<!-- <record model="ir.ui.view" id="hr_recruitment_hr_job_survey_extended">-->
<!-- <field name="name">hr.job.survey.extended</field>-->
<!-- <field name="model">hr.job</field>-->
<!-- <field name="inherit_id" ref="hr_recruitment.hr_job_survey"/>-->
<!-- <field name="arch" type="xml">-->
<!-- <xpath expr="//div[@name='button_box']/button[@name='%(hr_recruitment.action_hr_job_applications)d']" position="attributes">-->
<!-- <attribute name="name">%(action_hr_job_recruitment_applications)d</attribute>-->
<!-- </xpath>-->
<!-- </field>-->
<!-- </record>-->
<record id="hr_recruitment.crm_case_categ0_act_job" model="ir.actions.act_window">
<field name="search_view_id" ref="hr_applicant_view_search_bis_inherit"/>
<field name="context">{"search_default_job_recruitment_stage":1,"search_default_job_recruitment":1}</field>
<field name="context">
{"search_default_job_recruitment_stage":1,"search_default_job_recruitment":1,"search_default_my_applications":1}
</field>
</record>
</odoo>

View File

@ -21,7 +21,7 @@
<field name="experience" optional="hide"/>
<field name="company_id" column_invisible="True"/>
<field name="alias_name" column_invisible="True"/>
<field name="alias_id" invisible="not alias_name" optional="hide"/>
<field name="alias_id" invisible="not alias_name" column_invisible="True" optional="hide"/>
<field name="user_id" widget="many2one_avatar_user" optional="hide"/>
<field name="no_of_employee"/>
</list>
@ -107,6 +107,7 @@
<field name="recruitment_sequence" readonly="0" force_save="1"/>
<group>
<field name="job_id" string="Job Position"/>
<field name="job_category" force_save="1"/>
</group>
</div>
@ -126,17 +127,18 @@
<field name="address_id" context="{'show_address': 1}" placeholder="Remote"
can_create="True" can_write="True"/>
</div>
<field name="industry_id" can_create="True" can_write="True"/>
<label for="alias_name" string="Email Alias"
<field name="industry_id" can_create="True" can_write="True" invisible="True"/>
<label for="alias_name" string="Email Alias" invisible="True"
help="Define a specific contact address for this job position. If you keep it empty, the default email address will be used which is in human resources settings"/>
<div name="alias_def">
<div name="alias_def" invisible="True">
<field name="alias_id" class="oe_read_only" string="Email Alias"
required="0" on_change="1" can_create="True" can_write="True"/>
<div class="oe_edit_only" name="edit_alias">
required="0" on_change="1" can_create="True" can_write="True" invisible="True"/>
<div class="oe_edit_only" name="edit_alias" invisible="True">
<field name="alias_name" class="oe_inline" placeholder="e.g. jobs"
on_change="1"/>@
on_change="1" invisible="True"/>@
<field name="alias_domain_id" class="oe_inline"
placeholder="e.g. domain.com"
invisible="True"
options="{'no_create': True, 'no_open': True}" can_create="True"
can_write="True"/>
</div>
@ -151,6 +153,7 @@
context="{'search_default_group_skill_type_id': 1}" can_create="True"
can_write="True"/>
<field name="company_id" on_change="1" can_create="True" can_write="True"/>
<field name="budget" placeholder="15.5 - 17.5 LPA"/>
<field name="target_from" widget="daterange" string="Mission Dates"
options="{'end_date_field': 'target_to'}"/>
<field name="target_to" invisible="1"/>
@ -205,7 +208,10 @@
<search string="Jobs">
<field name="job_id" string="Job Position"/>
<field name="department_id" operator="child_of"/>
<field name="user_id" string="Primary Recruiter"/>
<field name="interviewer_ids" string="Secondary Recruiters"/>
<separator/>
<filter string="My Assignments" name="my_assignments" domain="['|',('user_id', '=', uid),('interviewer_ids','in',uid)]"/>
<filter name="message_needaction" string="Unread Messages"
domain="[('message_needaction', '=', True)]"
groups="mail.group_mail_notification_type_inbox"/>
@ -300,6 +306,10 @@
<button class="btn btn-primary" name="%(action_hr_job_recruitment_applications)d" type="action">
<field name="new_application_count"/> New Applications
</button>
<br/><br/>
<div t-if="record.budget.value">
<strong>Budget : </strong> <field name="budget"/>
</div>
</div>
<div class="col-5">
<a name="edit_job" type="open" t-attf-class="{{ record.no_of_recruitment.raw_value &gt; 0 ? 'text-primary fw-bolder' : 'text-secondary' }}" groups="hr_recruitment.group_hr_recruitment_user">
@ -344,7 +354,7 @@
<field name="res_model">hr.job.recruitment</field>
<field name="view_mode">kanban,list,form,search</field>
<field name="search_view_id" ref="view_job_recruitment_filter"/>
<field name="context">{"search_default_Current":1}</field>
<field name="context">{"search_default_Current":1,"search_default_my_assignments":1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Ready to recruit more efficiently?
@ -365,5 +375,23 @@
action="action_hr_job_recruitment"
sequence="1"
groups="base.group_user"/>
<menuitem
name="By Job Positions"
id="hr_recruitment.menu_hr_job_position"
parent="hr_recruitment.menu_crm_case_categ0_act_job"
action="hr_recruitment.action_hr_job"
sequence="30"
groups="hr_recruitment.group_hr_recruitment_user"/>
<!-- <menuitem-->
<!-- name="Candidates"-->
<!-- parent="hr_recruitment.menu_crm_case_categ0_act_job"-->
<!-- id="menu_hr_candidate_interviewer"-->
<!-- action="hr_recruitment.action_hr_candidate"-->
<!-- sequence="29"-->
<!-- groups="base.group_user"/>-->
</data>
</odoo>

View File

@ -115,6 +115,12 @@
<field name="model">hr.job</field>
<field name="inherit_id" ref="hr.view_hr_job_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook" position="before">
<group>
<field name="department_id"/>
<field name="job_category"/>
</group>
</xpath>
<xpath expr="//notebook" position="inside">
<page string="All Recruitments" name="hr_job_recruitments_page">
<field name="hr_job_recruitments"/>
@ -312,7 +318,13 @@
action="hr_recruitment_extended.action_server"/>
-->
<menuitem
<record id="hr_recruitment.action_hr_candidate" model="ir.actions.act_window">
<field name="search_view_id" ref="hr_recruitment.hr_candidate_view_search"/>
<field name="context">{'search_default_my_candidates': 1}</field>
</record>
<menuitem
name="By Job Positions"
id="hr_recruitment.menu_hr_job_position"
parent="hr_recruitment.menu_crm_case_categ0_act_job"
@ -320,5 +332,17 @@
sequence="30"
groups="hr_recruitment.group_hr_recruitment_user"/>
<menuitem
name="By Job Positions"
id="hr_recruitment.menu_hr_job_position_interviewer"
parent="hr_recruitment.menu_crm_case_categ0_act_job"
action="hr_recruitment.action_hr_job_interviewer"
sequence="31"
groups="base.group_no_one"/>
</data>
</odoo>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<!-- Tree View (List View) -->
<record id="view_job_category_tree" model="ir.ui.view">
<field name="name">job.category.list</field>
<field name="model">job.category</field>
<field name="arch" type="xml">
<list string="Category" editable="bottom">
<field name="category_name" required="1"/>
<field name="default_user"/>
</list>
</field>
</record>
<!-- Action to open Locations -->
<record id="action_job_category" model="ir.actions.act_window">
<field name="name">Categories</field>
<field name="res_model">job.category</field>
<field name="view_mode">list</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new Job Category
</p>
</field>
</record>
<menuitem
id="job_category_menu"
name="Job Categories"
action="action_job_category"
parent="hr_recruitment.menu_hr_recruitment_config_jobs"
sequence="5"/>
</data>
</odoo>

View File

@ -11,7 +11,7 @@ class RecruitmentSource(models.Model):
url = fields.Char(compute='_compute_url', string='Tracker URL')
@api.depends('source_id', 'source_id.name', 'job_id', 'job_id.company_id')
@api.depends('source_id', 'source_id.name', 'job_recruitment_id', 'job_recruitment_id.company_id')
def _compute_url(self):
for source in self:
source.url = urls.url_join(source.job_recruitment_id.get_base_url(), "%s?%s" % (