diff --git a/yuthon_hr_employee/__manifest__.py b/yuthon_hr_employee/__manifest__.py index cd97e9fcf..517a581a5 100644 --- a/yuthon_hr_employee/__manifest__.py +++ b/yuthon_hr_employee/__manifest__.py @@ -28,6 +28,7 @@ 'wizard/hr_employee_wizard_views.xml', 'views/inherit_hr_applicant_views.xml', 'views/publish_applicant_setting_views.xml', + 'views/yuthon_job_postings_views.xml', ], 'installable': True, 'application': False, diff --git a/yuthon_hr_employee/models/__init__.py b/yuthon_hr_employee/models/__init__.py index 6fefa5327..6511d7071 100644 --- a/yuthon_hr_employee/models/__init__.py +++ b/yuthon_hr_employee/models/__init__.py @@ -7,5 +7,6 @@ from . import inherit_hr_job from . import inherit_hr_applicant from . import applicant_tage_setting from . import publish_applicant_setting +from . import yuthon_job_postings diff --git a/yuthon_hr_employee/models/inherit_hr_applicant.py b/yuthon_hr_employee/models/inherit_hr_applicant.py index e8ed434f1..de9a9b266 100644 --- a/yuthon_hr_employee/models/inherit_hr_applicant.py +++ b/yuthon_hr_employee/models/inherit_hr_applicant.py @@ -19,8 +19,12 @@ class HrApplicant(models.Model): tage_ids = fields.Many2many('applicant.tage.setting', string="应聘标签") is_interview_status = fields.Boolean(string="面试状态") + full_title = fields.Char(string="完整标题", compute="_compute_full_title") - + @api.depends('name') + def _compute_full_title(self): + for record in self: + record.full_title = f"{record.name} 招聘需求表" class HrJobType(models.Model): _name = "hr.job.type" diff --git a/yuthon_hr_employee/models/inherit_hr_job.py b/yuthon_hr_employee/models/inherit_hr_job.py index b2fcd00f4..7883d809a 100644 --- a/yuthon_hr_employee/models/inherit_hr_job.py +++ b/yuthon_hr_employee/models/inherit_hr_job.py @@ -40,19 +40,10 @@ class HrJob(models.Model): years_of_service = fields.Integer(string="工作年限") competency_requirements = fields.Text(string="能力要求") other_notes = fields.Text(string="其他要求说明") + function = 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('no_of_employee') def _compute_job_personnel(self): diff --git a/yuthon_hr_employee/security/ir.model.access.csv b/yuthon_hr_employee/security/ir.model.access.csv index c2294f8c4..040fe2fe2 100644 --- a/yuthon_hr_employee/security/ir.model.access.csv +++ b/yuthon_hr_employee/security/ir.model.access.csv @@ -10,4 +10,5 @@ access_yuthon_personal_skills_schedule,yuthon_personal_skills_schedule,model_yut access_yuthon_directly_detail_lines,yuthon_directly_detail_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_publish_applicant_setting,publish_applicant_setting,model_publish_applicant_setting,base.group_user,1,1,1,1 -access_applicant_tage_setting,applicant_tage_setting,model_applicant_tage_setting,base.group_user,1,1,1,1 \ No newline at end of file +access_applicant_tage_setting,applicant_tage_setting,model_applicant_tage_setting,base.group_user,1,1,1,1 +access_yuthon_job_postings,yuthon_job_postings,model_yuthon_job_postings,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/yuthon_hr_employee/views/inherit_hr_applicant_views.xml b/yuthon_hr_employee/views/inherit_hr_applicant_views.xml index cd99f8884..817b34290 100644 --- a/yuthon_hr_employee/views/inherit_hr_applicant_views.xml +++ b/yuthon_hr_employee/views/inherit_hr_applicant_views.xml @@ -9,7 +9,7 @@

- +

@@ -75,5 +75,16 @@ - + + hr.applicant.inherit.kanban + 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 e736016aa..506e98d40 100644 --- a/yuthon_hr_employee/views/inherit_hr_job_views.xml +++ b/yuthon_hr_employee/views/inherit_hr_job_views.xml @@ -65,6 +65,9 @@ 1 + + 1 + @@ -100,36 +103,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -147,6 +120,9 @@ + + + diff --git a/yuthon_hr_employee_approval/models/inherit_hr_applicant.py b/yuthon_hr_employee_approval/models/inherit_hr_applicant.py index dbfd0d06a..b4e379f10 100644 --- a/yuthon_hr_employee_approval/models/inherit_hr_applicant.py +++ b/yuthon_hr_employee_approval/models/inherit_hr_applicant.py @@ -23,6 +23,7 @@ class HrApplicant(models.Model): for applicant in self: if not applicant.is_interview_status: applicant.is_interview_status = True + else: raise UserError('已提交面试申请') @@ -33,6 +34,7 @@ class HrApplicant(models.Model): stage_self = stage_list.index(sta.stage_id.name) if stage_self == 0: sta.stage_id = self.env['hr.recruitment.stage'].search([('name', '=', stage_list[stage_self + 1])]).id + form_id = self.env.ref("yuthon_hr_employee_approval.view_yuthon_interview_approval_form").id return { 'type': 'ir.actions.act_window', diff --git a/yuthon_hr_employee_approval/models/yuthon_interview_approval.py b/yuthon_hr_employee_approval/models/yuthon_interview_approval.py index be6df23c1..ae896768c 100644 --- a/yuthon_hr_employee_approval/models/yuthon_interview_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_interview_approval.py @@ -17,6 +17,7 @@ class YuthonInterviewApproval(models.Model): employee_ids = fields.Many2many('hr.employee', string='面试官') applicant_ids = fields.One2many('hr.applicant', 'interview_approval_id', string='应聘面试信息') + def test_submissions(self): # 得到标签顺序列表,用来判断下一个阶段 stage_list = [stage.name for stage in self.env['hr.recruitment.stage'].search([])] @@ -33,7 +34,8 @@ class YuthonInterviewApproval(models.Model): else: # 已经是最后一个阶段,可以进行其他操作,例如发送通知等 raise UserError('已经是最后一个阶段') - + elif applicant.interview_results == 'fail': + applicant.stage_id = failed_stage diff --git a/yuthon_hr_employee_approval/models/yuthon_message_login.py b/yuthon_hr_employee_approval/models/yuthon_message_login.py index b0a5d7ba9..15d616939 100644 --- a/yuthon_hr_employee_approval/models/yuthon_message_login.py +++ b/yuthon_hr_employee_approval/models/yuthon_message_login.py @@ -73,7 +73,7 @@ class YuthonMessageLogin(models.Model): ("spouse", "配偶"), ("spouse", "其他")], string="关系") #附件 - one_inch_photo_id = fields.Many2one('documents.document',string='一寸照片') + image_1920 = fields.Image("一寸照") id_card_id = fields.Many2one('documents.document',string='身份证') expirationDate = fields.Date(string='身份证有效期') residence_permit = fields.Char(string='居住证(非本市提供的办理证明,截图也可)') diff --git a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py index 62a683d0e..1df0bb399 100644 --- a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py @@ -26,20 +26,13 @@ class YuthonOnboardApproval(models.Model): yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储'), ('tctj', '天投城建')], string="甲方") - date_birth = fields.Date(string='出生年月') - nation = fields.Selection(nation_list, string='民族') grades_id = fields.Many2one('yuthon.job.lv', string='职级') account = fields.Char(string='账号') bank = fields.Char(string='开户行') - origin = fields.Char(string='籍贯') - political = fields.Selection([('cpc_dang', '中共党员'), ('nld', '民盟'), - ('league_member', '共青团员'), ('people', '群众')], string="政治面貌") - education = fields.Char(string='学历') onboard_time = fields.Date(string='入职时间') probation_period = fields.Selection([('zero', '0个月'), ('one', '1个月'), - ('two', '2个月'), ('three', '3个月'), ('year', '1年')], string='试用期') - contract_start = fields.Date(string='合同开始日期') - contract_end = fields.Date(string='合同结束日期') + ('two', '2个月'), ('three', '3个月'), ('year', '1年')], string='试用期结束时间') + duration_employment = fields.Date(string='劳动合同期限') salary = fields.Float(string='基本工资') oter = fields.Text(string='其他约定') social_security = fields.Char(string='社保时长') 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 952b77f07..5e13ab204 100644 --- a/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml @@ -40,19 +40,12 @@ - + - - - - - - - - - + +