diff --git a/yuthon_hr_employee/models/inherit_hr_applicant.py b/yuthon_hr_employee/models/inherit_hr_applicant.py index 9dde48fbf..92ff55033 100644 --- a/yuthon_hr_employee/models/inherit_hr_applicant.py +++ b/yuthon_hr_employee/models/inherit_hr_applicant.py @@ -5,39 +5,19 @@ class HrApplicant(models.Model): _inherit = "hr.applicant" #基础信息 - job_lv_id = fields.Many2one('yuthon.job.lv', string="职级") - is_recruitment_status = fields.Boolean(string="招聘状态") - job_type_id = fields.Many2one('hr.job.type', string="岗位类别") - affiliation = fields.Char(string="所属单位") - #任职要求 - education = fields.Char(string="学历") - approval_sex = fields.Selection([('girl', '女'), ('boy', '男')], string="性别") - age_start = fields.Integer(string="年龄") - age_end = fields.Integer(string="年龄") - political_aspects = fields.Selection([('cpc_dang', '中共党员'), ('nld', '民盟'), - ('league_member', '共青团员'), ('people', '群众')], string="政治面貌") - professional = fields.Char(string="专业") - title = fields.Char(string="职称") - admissions = fields.Char(string="执业资格") - years_of_service = fields.Integer(string="工作年限") - competency_requirements = fields.Text(string="能力要求") - other_notes = fields.Text(string="其他要求说明") + takes_time = fields.Date(string="需要时间") + colleges = fields.Char(string="院校") + degree_id = fields.Selection([('high', '高中'), ('junior_college', '大专'), ('bachelor', '本科'), + ('master', '硕士'), ('doctor', '博士')], string="学历") + major = fields.Char(string="专业") + years_of_service = fields.Char(string="工作年限") + original_position = fields.Char(string='原工作岗位') + previous_position = fields.Char(string='原职务') + status_first = fields.Selection([('in_service', '尚在职'), ('retired', '办理离职'), ('leaving', '已离职')] ,string='现就业状态') + contract_documents_ids = fields.Many2many('documents.document', string="附件") + - #招聘信息 - date_of_filing = fields.Date(string="申报日期") - reason_recruitment = fields.Char(string="招聘事由") - ideal_date = fields.Date(string="希望到岗日期") - recruit_start_date = fields.Date(string="招聘开始日期") - recruit_end_date = fields.Date(string="招聘截止日期") - recruit_over_date = fields.Date(string="招聘结束日期") - recruit_priority = fields.Selection([('high', '高'), ('middle', '中'), ('low', '低')], string="招聘优先级") - people_needed = fields.Integer(string="需要编内人数") - people_needed_outside = fields.Integer(string="需要编外人数") - place_work = fields.Char(string="工作地点") - is_referral = fields.Boolean(string="允许员工推荐") - job_description = fields.Text(string="招聘情况说明") - publish_applicant_ids = fields.Many2many('publish.applicant.setting', string="招聘发布途径") diff --git a/yuthon_hr_employee/models/inherit_hr_job.py b/yuthon_hr_employee/models/inherit_hr_job.py index 1a12eb8e6..8bb8b426a 100644 --- a/yuthon_hr_employee/models/inherit_hr_job.py +++ b/yuthon_hr_employee/models/inherit_hr_job.py @@ -19,6 +19,35 @@ class HrJob(models.Model): establishment_quotas = fields.Integer(string="编制定员") job_personnel = fields.Char(string="在岗人员") remarks = fields.Text(string="备注") + is_recruitment_status = fields.Boolean(string="招聘状态") + + #任职要求 + degree = fields.Selection([('high', '高中'), ('junior_college', '大专'), ('bachelor', '本科'), + ('master', '硕士'), ('doctor', '博士')], string="学历") + approval_sex = fields.Selection([('girl', '女'), ('boy', '男')], string="性别") + age_start = fields.Integer(string="年龄") + age_end = fields.Integer(string="年龄") + political_aspects = fields.Selection([('cpc_dang', '中共党员'), ('nld', '民盟'), + ('league_member', '共青团员'), ('people', '群众')], string="政治面貌") + professional = fields.Char(string="专业") + title = fields.Char(string="职称") + admissions = fields.Char(string="执业资格") + years_of_service = fields.Integer(string="工作年限") + competency_requirements = fields.Text(string="能力要求") + other_notes = fields.Text(string="其他要求说明") + + #招聘信息 + date_of_filing = fields.Date(string="申报日期") + reason_recruitment = fields.Char(string="招聘事由") + ideal_date = fields.Date(string="希望到岗日期") + recruit_start_date = fields.Date(string="招聘开始日期") + recruit_end_date = fields.Date(string="招聘截止日期") + recruit_over_date = fields.Date(string="招聘结束日期") + recruit_priority = fields.Selection([('high', '高'), ('middle', '中'), ('low', '低')], string="招聘优先级") + place_work = fields.Char(string="工作地点") + is_referral = fields.Boolean(string="允许员工推荐") + job_description = fields.Text(string="招聘情况说明") + publish_applicant_ids = fields.Many2many('publish.applicant.setting', string="招聘发布途径") @api.depends('establishment_quotas', 'no_of_employee') def _compute_compiling_status(self): diff --git a/yuthon_hr_employee/views/inherit_hr_applicant_views.xml b/yuthon_hr_employee/views/inherit_hr_applicant_views.xml index bf27a4612..c59d02c49 100644 --- a/yuthon_hr_employee/views/inherit_hr_applicant_views.xml +++ b/yuthon_hr_employee/views/inherit_hr_applicant_views.xml @@ -5,96 +5,41 @@ hr.applicant - - 岗位 - - - 最低学历 -

- 招聘信息 +

- - + + + + - + + + - - + + + - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
- \ No newline at end of file diff --git a/yuthon_hr_employee/views/inherit_hr_job_views.xml b/yuthon_hr_employee/views/inherit_hr_job_views.xml index 8036e4c21..90ead36a9 100644 --- a/yuthon_hr_employee/views/inherit_hr_job_views.xml +++ b/yuthon_hr_employee/views/inherit_hr_job_views.xml @@ -50,6 +50,42 @@ hr.job + + 基础信息 + + + 任职要求 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/yuthon_hr_employee_approval/__manifest__.py b/yuthon_hr_employee_approval/__manifest__.py index d4fd4b497..99cef6d8b 100644 --- a/yuthon_hr_employee_approval/__manifest__.py +++ b/yuthon_hr_employee_approval/__manifest__.py @@ -14,6 +14,9 @@ 'depends':['base', 'hr', 'yuthon_hr_employee', 'soong_workflow', 'documents','hr_recruitment'], 'data': [ 'security/ir.model.access.csv', + 'data/process_code_data.xml', + 'data/tage_approval_data.xml', + 'views/inherit_hr_applicant_views.xml', 'views/inherit_hr_job_views.xml', 'views/yuthon_message_login_views.xml', 'views/yuthon_onboard_approval_views.xml', diff --git a/yuthon_hr_employee_approval/data/tage_approval_data.xml b/yuthon_hr_employee_approval/data/tage_approval_data.xml new file mode 100644 index 000000000..4334bb28f --- /dev/null +++ b/yuthon_hr_employee_approval/data/tage_approval_data.xml @@ -0,0 +1,21 @@ + + + + 求职意向高 + + + 可随时入职 + + + 薪资可满足 + + + 能力匹配 + + + 专业对口 + + + 经验丰富 + + diff --git a/yuthon_hr_employee_approval/models/__init__.py b/yuthon_hr_employee_approval/models/__init__.py index 472ba45b4..5a367bdf4 100644 --- a/yuthon_hr_employee_approval/models/__init__.py +++ b/yuthon_hr_employee_approval/models/__init__.py @@ -1,5 +1,6 @@ from . import hr_employee_page from . import inherit_hr_job +from . import inherit_hr_applicant from . import yuthon_message_login from . import yuthon_onboard_approval from . import yuthon_account_approval diff --git a/yuthon_hr_employee_approval/models/hr_employee_page.py b/yuthon_hr_employee_approval/models/hr_employee_page.py index 14283b155..37c058c11 100644 --- a/yuthon_hr_employee_approval/models/hr_employee_page.py +++ b/yuthon_hr_employee_approval/models/hr_employee_page.py @@ -73,6 +73,29 @@ class YuthoJobRequirementDetailLine(models.Model): recruitment_ids = fields.One2many('hr.job', 'recruitment_approval_id', string="招聘申请") + +class YuthonInterviewInformationDetailLine(models.Model): + _name = "yuthon.interview.detail.line" + _description = "面试信息明细行" + + + interview_id = fields.Many2one('yuthon.interview.approval', string="关联面试信息") + recruiters_name = fields.Char(string='姓名') + colleges = fields.Char(string='院校') + degree = fields.Selection([('high', '高中'), ('junior_college', '大专'), ('bachelor', '本科'), + ('master', '硕士'), ('doctor', '博士')], string="学历") + major = fields.Char(string='专业') + years_of_service = fields.Char(string='工作年限') + original_position = fields.Char(string='原工作岗位') + previous_position = fields.Char(string='原职务') + status_first = fields.Selection([('in_service', '尚在职'), ('retired', '办理离职'), ('leaving', '已离职')] ,string='现就业状态') + contract_documents_ids = fields.Many2many('documents.document', string="附件") + interviewer = fields.Many2one('hr.employee', string='面试官') + interview_time = fields.Datetime(string='面试时间') + location = fields.Char(string='地点') + interview_results = fields.Selection([('pass', '通过'), ('fail', '不通过')], string="面试结果") + tage_ids = fields.Many2many('hr.applicant.category', string="应聘标签") + class HrJobType(models.Model): _name = "hr.job.type" diff --git a/yuthon_hr_employee_approval/models/inherit_hr_applicant.py b/yuthon_hr_employee_approval/models/inherit_hr_applicant.py new file mode 100644 index 000000000..8273ba5b4 --- /dev/null +++ b/yuthon_hr_employee_approval/models/inherit_hr_applicant.py @@ -0,0 +1,39 @@ +from odoo import api, fields, models, _ + + +class HrApplicant(models.Model): + _inherit = 'hr.applicant' + + + def pub_interview_approval(self): + stage_id_to_selection_mapping = { + 2: 'first', + 3: 'second', + 4: 'end', + } + default_interview_stage = stage_id_to_selection_mapping.get(self.stage_id.id) + # ... existing code ... + + hr_applicant_ids = self.env["hr.applicant"].browse(self._context.get('active_ids', self._context.get('active_id'))) + hr_applicant_data = [] + for job in hr_applicant_ids: + hr_applicant_data.append((0, 0, { + 'major' :job.major, + 'degree':job.degree_id, + 'recruiters_name':job.partner_name, + 'years_of_service':job.years_of_service + } + )) + form_id = self.env.ref("yuthon_hr_employee_approval.view_yuthon_interview_approval_form").id + return { + 'type': 'ir.actions.act_window', + 'name': '提交面试申请', + 'res_model': 'yuthon.interview.approval', + "views": [[form_id, "form"]], + "context": { + 'default_interview_stage': default_interview_stage, + 'default_job_applying' : self.job_id.id, + 'default_department': self.department_id.id, + 'default_interview_ids': hr_applicant_data, + } + } diff --git a/yuthon_hr_employee_approval/models/inherit_hr_job.py b/yuthon_hr_employee_approval/models/inherit_hr_job.py index 15e50ad03..574b725a8 100644 --- a/yuthon_hr_employee_approval/models/inherit_hr_job.py +++ b/yuthon_hr_employee_approval/models/inherit_hr_job.py @@ -80,4 +80,4 @@ class HrJob(models.Model): 'default_name': f'{self.department_id.name}部门编制调制申请表', 'default_adjust_information_ids': hr_job_data, } - } \ No newline at end of file + } diff --git a/yuthon_hr_employee_approval/models/yuthon_interview_approval.py b/yuthon_hr_employee_approval/models/yuthon_interview_approval.py index d3cc1601b..4a5e4d2d6 100644 --- a/yuthon_hr_employee_approval/models/yuthon_interview_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_interview_approval.py @@ -8,4 +8,9 @@ class YuthonInterviewApproval(models.Model): name = fields.Char(string='名称') - code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_interview_approval_code')) + interview_stage = fields.Selection([('first', '初试'), ('second', '复试'), ('end','终试')], string="面试阶段") + job_id = fields.Many2one('hr.job', string='应聘岗位') + department_id = fields.Many2one("hr.department", string="应聘职务", required=True) + code = fields.Char(string="面试表编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_interview_approval_code')) + + interview_ids = fields.One2many('yuthon.interview.detail.line', 'interview_id', string='应聘面试信息') \ No newline at end of file diff --git a/yuthon_hr_employee_approval/security/ir.model.access.csv b/yuthon_hr_employee_approval/security/ir.model.access.csv index 95882c49a..83eb92554 100644 --- a/yuthon_hr_employee_approval/security/ir.model.access.csv +++ b/yuthon_hr_employee_approval/security/ir.model.access.csv @@ -16,6 +16,8 @@ access_yuthon_service_approval,yuthon_service_approval,model_yuthon_service_appr access_yuthon_system_approval,yuthon_system_approval,model_yuthon_system_approval,base.group_user,1,1,1,1 access_yuthon_title_approval,yuthon_title_approval,model_yuthon_title_approval,base.group_user,1,1,1,1 access_yuthon_personal_skills_schedule,yuthon_personal_skills_schedule,model_yuthon_personal_skills_schedule,base.group_user,1,1,1,1 -access_yuthon_directly_detail_lines,yuthon_directly_detail_lines,model_yuthon_directly_detail_lines,base.group_user,1,1,1,1 +access_yuthon_directly_detail_lines,yuthon_directly_degin_trgm_opstail_lines,model_yuthon_directly_detail_lines,base.group_user,1,1,1,1 access_yuthon_recent_work_detail_line,yuthon_recent_work_detail_line,model_yuthon_recent_work_detail_line,base.group_user,1,1,1,1 access_yuthon_trial_scenario_detail_line,yuthon_trial_scenario_detail_line,model_yuthon_trial_scenario_detail_line,base.group_user,1,1,1,1 +access_yuthon_job_requirement_detail_line,yuthon_job_requirement_detail_line,model_yuthon_job_requirement_detail_line,base.group_user,1,1,1,1 +access_yuthon_interview_detail_line,yuthon_interview_detail_line,model_yuthon_interview_detail_line,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/yuthon_hr_employee_approval/views/inherit_hr_applicant_views.xml b/yuthon_hr_employee_approval/views/inherit_hr_applicant_views.xml new file mode 100644 index 000000000..689f76bc0 --- /dev/null +++ b/yuthon_hr_employee_approval/views/inherit_hr_applicant_views.xml @@ -0,0 +1,15 @@ + + + + inherit.hr.applicant.approval.tree + hr.applicant + + + +
+
+
+
+
+
\ No newline at end of file diff --git a/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml index f35785330..ad1edddd1 100644 --- a/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml @@ -6,6 +6,10 @@ + + + + @@ -15,10 +19,43 @@
- - - +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -27,7 +64,7 @@ - 待开发 + 面试申请表 yuthon.interview.approval tree,form diff --git a/yuthon_hr_employee_approval/views/yuthon_recruitment_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_recruitment_approval_views.xml index dd91779c4..c22e3e83f 100644 --- a/yuthon_hr_employee_approval/views/yuthon_recruitment_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_recruitment_approval_views.xml @@ -80,7 +80,7 @@ - 招聘需要申请表 + 招聘需求申请表 yuthon.recruitment.approval tree,form diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml index c8180a8d0..16c3dd339 100644 --- a/yuthon_work_brand/views/hr_menus.xml +++ b/yuthon_work_brand/views/hr_menus.xml @@ -75,7 +75,7 @@