diff --git a/yuthon_hr_employee/models/inherit_hr_job.py b/yuthon_hr_employee/models/inherit_hr_job.py index 15db33123..1a12eb8e6 100644 --- a/yuthon_hr_employee/models/inherit_hr_job.py +++ b/yuthon_hr_employee/models/inherit_hr_job.py @@ -6,7 +6,7 @@ class HrJob(models.Model): _inherit = "hr.job" - company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), + yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司") job_type_id = fields.Many2one('hr.job.type', string="岗位类别") job_lv_id = fields.Many2one('yuthon.job.lv', string="职级") @@ -15,16 +15,23 @@ class HrJob(models.Model): is_enable = fields.Boolean(string="是否启用", default=False, compute="compute_is_enable", store=True) compiling_external = fields.Integer(string="编制外人数") compiling_status = fields.Selection([('1', '缺编'), ('2', '满编')], compute="_compute_compiling_status", string="状态") - missing_number = fields.Integer(string="缺编人数") + missing_number = fields.Integer(string="缺编人数",compute='_depends_missing_number') + establishment_quotas = fields.Integer(string="编制定员") + job_personnel = fields.Char(string="在岗人员") + remarks = fields.Text(string="备注") - @api.depends('expected_employees', 'no_of_employee') + @api.depends('establishment_quotas', 'no_of_employee') def _compute_compiling_status(self): for state in self: - if state.no_of_employee < state.expected_employees: + if state.no_of_employee < state.establishment_quotas: state.compiling_status = '1' else: state.compiling_status = '2' + @api.depends('establishment_quotas', 'no_of_employee') + def _depends_missing_number(self): + for rec in self: + rec.missing_number = rec.establishment_quotas - rec.no_of_employee @api.depends('start_time', 'end_time') diff --git a/yuthon_hr_employee/models/yuthon_hr_department.py b/yuthon_hr_employee/models/yuthon_hr_department.py index e21fab23d..2a08054fe 100644 --- a/yuthon_hr_employee/models/yuthon_hr_department.py +++ b/yuthon_hr_employee/models/yuthon_hr_department.py @@ -13,8 +13,10 @@ class YuthonHrDepartment(models.Model): department_function = fields.Char(string="部门职能") is_institution = fields.Boolean(string="是否机构") is_global_department = fields.Boolean(string="是否全局部门") - create_time = fields.Datetime(string="创建时间", default=fields.Datetime.now) - end_time = fields.Datetime(string="结束时间") + create_date = fields.Date(string="创建时间", default=fields.Date.today()) + start_date = fields.Date(string="生效日期", default=fields.Date.today()) + expiration_date = fields.Date(string="失效日期", default=fields.Date.today()) + end_date = fields.Date(string="结束时间") department_code = fields.Char(string="部门序号", store=True) @api.onchange('department_code', 'parent_id') diff --git a/yuthon_hr_employee/views/inherit_hr_applicant_views.xml b/yuthon_hr_employee/views/inherit_hr_applicant_views.xml index 436a884ee..bf27a4612 100644 --- a/yuthon_hr_employee/views/inherit_hr_applicant_views.xml +++ b/yuthon_hr_employee/views/inherit_hr_applicant_views.xml @@ -96,4 +96,5 @@ + \ 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 a705076f4..8036e4c21 100644 --- a/yuthon_hr_employee/views/inherit_hr_job_views.xml +++ b/yuthon_hr_employee/views/inherit_hr_job_views.xml @@ -23,8 +23,8 @@ - - + + @@ -52,18 +52,14 @@ - + - + - - - - - 1 +
diff --git a/yuthon_hr_employee/views/yuthon_hr_department_views.xml b/yuthon_hr_employee/views/yuthon_hr_department_views.xml index f1ab1fcca..202da3078 100644 --- a/yuthon_hr_employee/views/yuthon_hr_department_views.xml +++ b/yuthon_hr_employee/views/yuthon_hr_department_views.xml @@ -9,16 +9,27 @@ hr.department + + 1 + + + 1 + + + 1 + - + + + - - + + 1 diff --git a/yuthon_hr_employee_approval/__manifest__.py b/yuthon_hr_employee_approval/__manifest__.py index d47b78100..d4fd4b497 100644 --- a/yuthon_hr_employee_approval/__manifest__.py +++ b/yuthon_hr_employee_approval/__manifest__.py @@ -2,7 +2,7 @@ # email:pengyuthon@163.com { - 'name': 'Yuthon hr apporval', + 'name': 'Yuthon Hr Apporval', 'summary': '', 'description': ''' ''', @@ -11,9 +11,10 @@ 'license': 'LGPL-3', 'author': 'pengyuthon', 'website': 'https://www.pengyuthon.com', - 'depends':['base', 'hr', 'hr_recruitment', 'yuthon_hr_employee', 'soong_workflow'], + 'depends':['base', 'hr', 'yuthon_hr_employee', 'soong_workflow', 'documents','hr_recruitment'], 'data': [ 'security/ir.model.access.csv', + 'views/inherit_hr_job_views.xml', 'views/yuthon_message_login_views.xml', 'views/yuthon_onboard_approval_views.xml', 'views/yuthon_enrollment_approval_views.xml', diff --git a/yuthon_hr_employee_approval/data/process_code_data.xml b/yuthon_hr_employee_approval/data/process_code_data.xml new file mode 100644 index 000000000..a648acac7 --- /dev/null +++ b/yuthon_hr_employee_approval/data/process_code_data.xml @@ -0,0 +1,113 @@ + + + + 薪资核算申请表-编号 + yuthon_account_approval_code + XZ%(y)s%(month)s%(day)s + 3 + + + + 参保方案申请表-编号 + yuthon_enrollment_approval_code + CB%(y)s%(month)s%(day)s + 3 + + + + 面试信息表-编号 + yuthon_interview_approval_code + MS%(y)s%(month)s%(day)s + 3 + + + + 离职申请表-编号 + yuthon_leaving_approval_code + LZ%(y)s%(month)s%(day)s + 3 + + + + 个人信息登记表-编号 + yuthon_message_login_code + GR%(y)s%(month)s%(day)s + 3 + + + + 入职申请表-编号 + yuthon_onboard_approval_code + RZ%(y)s%(month)s%(day)s + 3 + + + + 编制调整需求表-编号 + yuthon_prepare_approval_code + BZ%(y)s%(month)s%(day)s + 3 + + + + 职级调整申请表-编号 + yuthon_rank_approval_code + ZJ%(y)s%(month)s%(day)s + 3 + + + + 调岗申请-编号 + yuthon_reassignment_approval_code + TG%(y)s%(month)s%(day)s + 3 + + + + 招聘需求申请表-编号 + yuthon_recruitment_approval_code + ZP%(y)s%(month)s%(day)s + 3 + + + + 转正申请表-编号 + yuthon_regularization_approval_code + ZZ%(y)s%(month)s%(day)s + 3 + + + + 员工奖罚-编号 + yuthon_salary_approval_code + YG%(y)s%(month)s%(day)s + 3 + + + 服务证明表-编号 + yuthon_service_approval_code + FW%(y)s%(month)s%(day)s + 3 + + + + 制度调整申请表-编号 + yuthon_system_approval_code + ZD%(y)s%(month)s%(day)s + 3 + + + + 职称聘任申请表-编号 + yuthon_title_approval_code + PZ%(y)s%(month)s%(day)s + 3 + + + + 编制调整需求表-编号 + yuthon_prepare_approval_code + BZ%(y)s%(month)s%(day)s + 3 + + diff --git a/yuthon_hr_employee_approval/models/__init__.py b/yuthon_hr_employee_approval/models/__init__.py index 20aec2faa..472ba45b4 100644 --- a/yuthon_hr_employee_approval/models/__init__.py +++ b/yuthon_hr_employee_approval/models/__init__.py @@ -1,3 +1,5 @@ +from . import hr_employee_page +from . import inherit_hr_job 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 ffc79eb93..14283b155 100644 --- a/yuthon_hr_employee_approval/models/hr_employee_page.py +++ b/yuthon_hr_employee_approval/models/hr_employee_page.py @@ -2,63 +2,6 @@ from odoo import api, fields, models, _ -class YuthonEmergencyContactLine(models.Model): - _name = 'yuthon.emergency.contact.line' - _description = "紧急联系人明细行" - _inherit = ['soong_workflow', 'mail.activity.mixin'] - - employee_id = fields.Many2one('hr.employee', string="关联员工") - message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记") - name = fields.Char(string="姓名") - user_sfz = fields.Char(string="身份证") - user_relationship = fields.Selection([("parents", "父母"), ("children", "子女"), ("spouse", "配偶"), ("spouse", "其他")], string="关系") - workplace = fields.Char(string="工作单位") - post = fields.Char(string="岗位") - phone_number = fields.Char(string="手机号") - home_address = fields.Char(string="家庭住址") - - -class YuthonWorkExperienceLine(models.Model): - _name = 'yuthon.work.experience.line' - _description = "工作经验明细行" - - employee_id = fields.Many2one('hr.employee', string="关联员工") - message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记") - start_date = fields.Date(string="开始日期") - end_date = fields.Date(string="结束日期") - work_place = fields.Char(string="工作单位") - post = fields.Char(string="岗位") - contact_user = fields.Char(string="联系人") - phone_number = fields.Char(string="联系人手机号") - reason_leaving = fields.Char(string="离职原因") - - -class YuthonEducationExperienceLine(models.Model): - _name = 'yuthon.education.experience.line' - _description = "教育经历明细行" - - employee_id = fields.Many2one('hr.employee', string="关联员工") - message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记") - name_school = fields.Char(string="学校名称") - start_date = fields.Date(string="入学时间") - end_date = fields.Date(string="毕业时间") - in_school_duties = fields.Char(string="在校职务") - professional = fields.Char(string="专业") - Part_time_degree = fields.Char(string="非全日制学历学位") - full_time_degree = fields.Char(string="全日制学历学位") - major_courses = fields.Char(string="主修课程") - - -class YuthonSkillsCertificatesLine(models.Model): - _name = 'yuthon.skills.certificates.line' - _description = "技能证书管理明细行" - - employee_id = fields.Many2one('hr.employee', string="关联员工") - message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记") - rank_name = fields.Char(string='职级名称') - rank_type = fields.Char(string='职级类型') - rank_time = fields.Date(string='职级时间') - class YuthonPersonalSkillsSchedule(models.Model): _name = 'yuthon.personal.skills.schedule' @@ -88,10 +31,49 @@ class YuthonMostRecentWorkDetailLine(models.Model): _name = 'yuthon.recent.work.detail.line' _description = "最近工作经历明细行" - message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记") # 同上 + message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记") position = fields.Char(string='单位名称') post = fields.Char(string="岗位") last_department = fields.Char(string='部门') work_grades = fields.Char(string='工作内容成绩') last_training = fields.Char(string='培训') last_work_reason = fields.Char(string='离职原因') + +class YuthonTrialScenarioDetailLine(models.Model): + _name = 'yuthon.trial.scenario.detail.line' + _description = "试用方案明细行 " + + regularization_login_id = fields.Many2one('yuthon.regularization.approval', string="关联转正信息") + job_responsibilities = fields.Char(string='工作职责') + mission_objectives = fields.Char(string='工作任务与目标') + completion_flag = fields.Char(string='工作完成标志') + weight = fields.Integer(string='权重') + completion_score = fields.Char(string='完成情况') + assessment_scoring = fields.Char(string='考核评分') + + +class YuthoJobRequirementDetailLine(models.Model): + _name = 'yuthon.job.requirement.detail.line' + _description = "任职要求明细行" + + + qualifications_id = fields.Many2one('yuthon.requirement.approval', string="关联招聘需求") + job_lv_work = fields.Many2one('hr.job.type', string="岗位类别") + degree = fields.Selection([('high', '高中'), ('junior_college', '大专'), ('bachelor', '本科'), + ('master', '硕士'), ('doctor', '博士')], string="学历") + sex = fields.Selection([('male', '男'), ('female', '女')], string="性别") + specialty = fields.Char(string="专业") + title = fields.Char(string="职称") + admissions = fields.Char(string="执业资格") + political_aspects = fields.Selection([('cpc_dang', '中共党员'), ('nld', '民盟'), + ('league_member', '共青团员'), ('people', '群众')], string="政治面貌") + competency_require = fields.Char(string="能力要求") + age = fields.Char(string="年龄") + years_of_service = fields.Char(string="工作年限") + + recruitment_ids = fields.One2many('hr.job', 'recruitment_approval_id', string="招聘申请") + +class HrJobType(models.Model): + _name = "hr.job.type" + + name = fields.Char(string="类别名称") \ No newline at end of file diff --git a/yuthon_hr_employee_approval/models/inherit_hr_job.py b/yuthon_hr_employee_approval/models/inherit_hr_job.py new file mode 100644 index 000000000..15e50ad03 --- /dev/null +++ b/yuthon_hr_employee_approval/models/inherit_hr_job.py @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- +from odoo import api, fields, models, _ +from odoo.exceptions import UserError + +class HrJob(models.Model): + _inherit = "hr.job" + + prepare_approval_id = fields.Many2one('yuthon.prepare.approval') + recruitment_approval_id = fields.Many2one('yuthon.recruitment.approval') + + is_pub = fields.Boolean(string="发布状态") + + def pub_applicant_approval_button(self): + """ + 发布需求审批流程 + """ + for pub in self: + if pub.is_pub == True: + raise UserError('该岗位已提交需求申请') + hr_job_ids = self.env["hr.job"].browse(self._context.get('active_ids', self._context.get('active_id'))) + hr_job_data = [] + for job in hr_job_ids: + hr_job_data.append((0, 0, { + 'name': job.name, + 'department_id': job.department_id.id, + 'job_type_id': job.job_type_id.id, + 'job_lv_id': job.job_lv_id.name, + 'yuthon_company': job.yuthon_company, + 'establishment_quotas': job.establishment_quotas, + 'no_of_employee': job.no_of_employee, + 'compiling_external': job.compiling_external, + 'missing_number' : job.missing_number, + 'compiling_status' : job.compiling_status, + 'job_personnel' : job.job_personnel, + 'remarks' : job.remarks, + })) + form_id = self.env.ref("yuthon_hr_employee_approval.view_yuthon_recruitment_approval_form").id + return { + 'type': 'ir.actions.act_window', + 'name': '提交岗位需求申请', + 'res_model': 'yuthon.recruitment.approval', + "views": [[form_id, "form"]], + "context": { + 'default_name': f'{self.department_id.name}部门需求申请表', + 'default_recruitment_ids': hr_job_data, + } + } + + def pub_prepare_approval_button(self): + """ + 发布编制调需求审批 + """ + for pub in self: + if pub.is_pub == True: + raise UserError('该岗位编制调整需要已审批') + hr_job_ids = self.env["hr.job"].browse(self._context.get('active_ids', self._context.get('active_id'))) + hr_job_data = [] + for job in hr_job_ids: + hr_job_data.append((0, 0, { + 'name': job.name, + 'department_id': job.department_id.id, + 'job_type_id': job.job_type_id.id, + 'job_lv_id': job.job_lv_id.name, + 'yuthon_company': job.yuthon_company, + 'establishment_quotas': job.establishment_quotas, + 'no_of_employee': job.no_of_employee, + 'compiling_external': job.compiling_external, + 'missing_number': job.missing_number, + 'compiling_status': job.compiling_status, + 'job_personnel': job.job_personnel, + 'remarks': job.remarks,} + )) + form_id = self.env.ref("yuthon_hr_employee_approval.view_yuthon_prepare_approval_form").id + return { + 'type': 'ir.actions.act_window', + 'name': '提交岗位编制调整申请', + 'res_model': 'yuthon.prepare.approval', + "views": [[form_id, "form"]], + "context": { + '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_account_approval.py b/yuthon_hr_employee_approval/models/yuthon_account_approval.py index ca822faf1..d8705dcd3 100644 --- a/yuthon_hr_employee_approval/models/yuthon_account_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_account_approval.py @@ -8,4 +8,4 @@ class YuthonAccountApproval(models.Model): name = fields.Char(string='名称') - + code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_account_approval_code')) diff --git a/yuthon_hr_employee_approval/models/yuthon_enrollment_approval.py b/yuthon_hr_employee_approval/models/yuthon_enrollment_approval.py index 56dd78ecb..4f92d3e06 100644 --- a/yuthon_hr_employee_approval/models/yuthon_enrollment_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_enrollment_approval.py @@ -6,4 +6,7 @@ class YuthonEnrollmentApproval(models.Model): _description = '参保方案申请表' _inherit = 'soong.workflow.mixin' - name = fields.Char(string='名称') \ No newline at end of file + + name = fields.Char(string='名称') + code = fields.Char(string="编号", + default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_enrollment_approval')) \ 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 9fb1f5105..d3cc1601b 100644 --- a/yuthon_hr_employee_approval/models/yuthon_interview_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_interview_approval.py @@ -8,4 +8,4 @@ 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')) diff --git a/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py b/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py index a1b01dcf0..ce666981a 100644 --- a/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py @@ -8,4 +8,4 @@ class YuthonLeavingApproval(models.Model): name = fields.Char(string='名称') - + code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_leaving_approval_code')) diff --git a/yuthon_hr_employee_approval/models/yuthon_message_login.py b/yuthon_hr_employee_approval/models/yuthon_message_login.py index a3d5a6bc6..806579fe6 100644 --- a/yuthon_hr_employee_approval/models/yuthon_message_login.py +++ b/yuthon_hr_employee_approval/models/yuthon_message_login.py @@ -16,10 +16,12 @@ class YuthonMessageLogin(models.Model): _name = 'yuthon.message.login' _description = "个人信息登记表" _rec_name = 'name' - _inherit = 'soong.workflow.mixin' + _inherit = ['soong.workflow.mixin','yuthon.emergency.contact.line','yuthon.work.experience.line','yuthon.education.experience.line'] #基本信息 name = fields.Char(string='名称', default="人员信息登记表") + code = fields.Char(string="编号", + default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_message_login_code')) staff_name = fields.Char(string='姓名') sex = fields.Selection([('male', '男'), ('female', '女')], string='性别') date_birth = fields.Date(string='出生年月') @@ -53,8 +55,8 @@ class YuthonMessageLogin(models.Model): #最近工作情况 last_work = fields.Char(string='单位名称') - last_work_department = fields.Char(string='部门') - last_work_position = fields.Char(string='岗位') + last_work_department = fields.Many2one('hr.department', string="部门") + last_work_position = fields.Many2one('hr.job', string="岗位") last_work_grades = fields.Char(string='工作内容成绩') last_work_training = fields.Char(string='接受的培训') last_work_reason = 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 2536a5eb1..034524d4f 100644 --- a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py @@ -14,12 +14,15 @@ nation_list = [('a', '汉族'), ('b', '壮族'), ('v', '满族'), ('d', '回族' class YuthonOnboardApproval(models.Model): _name = 'yuthon.onboard.approval' _description = "入职申请表" - _inherit = 'soong.workflow.mixin' + _inherit = ['soong.workflow.mixin'] name = fields.Char(string='名称', default='入职申请表') + code = fields.Char(string="编号", + default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_onboard_approval_code')) worker_name = fields.Char(string='姓名') - company = fields.Many2one('res.company', string='公司') + yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), + ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司") date_birth = fields.Date(string='出生年月') nation = fields.Selection(nation_list, string='民族') grades = fields.Many2one('yuthon.job.lv', string='职级') @@ -32,4 +35,3 @@ class YuthonOnboardApproval(models.Model): ('two', '两个月'), ('three', '三个月'), ('year', '一年')], string='试用期') contract_start = fields.Date(string='合同开始日期') contract_end = fields.Date(string='合同结束日期') - select_company = fields.Many2one('res.company', string='选择入职公司') \ No newline at end of file diff --git a/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py b/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py index 6dbc4e9bc..f15b47231 100644 --- a/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py @@ -7,4 +7,15 @@ class YuthonPrepareApproval(models.Model): _inherit = 'soong.workflow.mixin' - name = fields.Char(string='名称') \ No newline at end of file + + name = fields.Char(string='名称') + code = fields.Char(string="编号", + default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_prepare_approval_code')) + subordinate_companies = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), + ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司") + department_id = fields.Many2one("hr.department", string="部门", required=True) + reason = fields.Char(string="事由") + notice_documents_ids = fields.Many2many('documents.document', string="附件") + + + adjust_information_ids = fields.One2many('hr.job', 'prepare_approval_id', string="调整信息") \ No newline at end of file diff --git a/yuthon_hr_employee_approval/models/yuthon_rank_approval.py b/yuthon_hr_employee_approval/models/yuthon_rank_approval.py index eef27f9b6..a2217fc2a 100644 --- a/yuthon_hr_employee_approval/models/yuthon_rank_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_rank_approval.py @@ -7,4 +7,7 @@ class YuthonRankApproval(models.Model): _inherit = 'soong.workflow.mixin' + name = fields.Char(string='名称') + code = fields.Char(string="编号", + default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_rank_approval_code')) diff --git a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py index 7515d6069..a6569f5ab 100644 --- a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py @@ -7,4 +7,7 @@ class YuthonReassignmentApproval(models.Model): _inherit = 'soong.workflow.mixin' + name = fields.Char(string='名称') + code = fields.Char(string="编号", + default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_reassignment_approval_code')) diff --git a/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py b/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py index f05d16900..87660624c 100644 --- a/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py @@ -7,4 +7,27 @@ class YuthonRecruitmentApproval(models.Model): _inherit = 'soong.workflow.mixin' - name = fields.Char(string='名称') \ No newline at end of file + + name = fields.Char(string='名称') + workers_name = fields.Char(string='姓名') + code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_recruitment_approval_code')) + subordinate_companies = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), + ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司") + department_id = fields.Many2one("hr.department", string="部门", required=True) + reason = fields.Char(string="事由") + notice_documents_ids = fields.Many2many('documents.document', string="附件") + degree = fields.Selection([('high', '高中'), ('junior_college', '大专'), ('bachelor', '本科'), + ('master', '硕士'), ('doctor', '博士')], string="学历") + sex = fields.Selection([('male', '男'), ('female', '女')], string="性别") + specialty = fields.Char(string="专业") + title = fields.Char(string="职称") + admissions = fields.Char(string="执业资格") + political_aspects = fields.Selection([('cpc_dang', '中共党员'), ('nld', '民盟'), + ('league_member', '共青团员'), ('people', '群众')], string="政治面貌") + competency_require = fields.Char(string="能力要求") + age = fields.Char(string="年龄") + years_of_service = fields.Char(string="工作年限") + + recruitment_ids = fields.One2many('hr.job', 'recruitment_approval_id', string="招聘申请") + qualifications_ids = fields.One2many('yuthon.job.requirement.detail.line', 'qualifications_id', string="应聘人员") + diff --git a/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py b/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py index 32df0dceb..f6a9a90bc 100644 --- a/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py @@ -7,4 +7,47 @@ class YuthonRegularizationPrepareApproval(models.Model): _inherit = 'soong.workflow.mixin' + + #员工信息 name = fields.Char(string='名称') + code = fields.Char(string="编号", + default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_regularization_approval_code')) + employee_name = fields.Many2one('hr.employee',string='员工姓名') + department_id = fields.Many2one("hr.department", string="任职部门", required=True) + job_id = fields.Many2one('hr.job', string="主岗") + job = fields.Char(string="职务") + partner_name = fields.Char(string="任职单位") + job_type_id = fields.Many2one('hr.job.type', string="岗位类别") + job_lv_id = fields.Many2one('yuthon.job.lv', string="职级") + onboarding_time = fields.Date(string="入职时间") + trial_end_date = fields.Date(string="试用期结束日期") + straight_online = fields.Char(string="直线上级") + business_leader = fields.Char(string="业务线上级") +# + #转正考核 + job_coach = fields.Char(string="工作指导人一") + job_coach2 = fields.Char(string="工作指导人二") + scoring_system = fields.Char(string="评分分制") + appraisal_total = fields.Char(string="考核权重合计") + trial_scores = fields.Char(string="试用考核得分") + assessment_date = fields.Date(string="自评日期") + self_evaluation = fields.Text(string="自我评价") + employee_pros = fields.Text(string="员工优点") + improvements = fields.Text(string="需改进事项") + notice_documents_ids = fields.Many2many('documents.document', string="考核文档") + + #转正结果 + positive_results = fields.Char(string="转正结果") + positive_date = fields.Date(string="转正日期") + is_salary_adjustments = fields.Boolean(string="是否调整薪资") + related_notes = fields.Text(string="转正相关说明") + + + + #试用信息明细行 + trial_assessment_ids = fields.One2many('yuthon.trial.scenario.detail.line', 'regularization_login_id', string="试用期考核方案",help='请选择适用本人主岗的试用考核方案,或直接在下方填写') + +class HrJobType(models.Model): + _name = "hr.job.type" + + name = fields.Char(string="类别名称") diff --git a/yuthon_hr_employee_approval/models/yuthon_reward_approval.py b/yuthon_hr_employee_approval/models/yuthon_reward_approval.py index 1a02e165d..c03d906b1 100644 --- a/yuthon_hr_employee_approval/models/yuthon_reward_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_reward_approval.py @@ -7,4 +7,7 @@ class YuthonRewardApproval(models.Model): _inherit = 'soong.workflow.mixin' + name = fields.Char(string='名称') + code = fields.Char(string="编号", + default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_prepare_approval_code')) \ No newline at end of file diff --git a/yuthon_hr_employee_approval/models/yuthon_salary_approval.py b/yuthon_hr_employee_approval/models/yuthon_salary_approval.py index 5fd70bf7f..6bc4ca4e1 100644 --- a/yuthon_hr_employee_approval/models/yuthon_salary_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_salary_approval.py @@ -7,5 +7,7 @@ class YuthonSalaryApproval(models.Model): _inherit = 'soong.workflow.mixin' - name = fields.Char(string='名称') + name = fields.Char(string='名称') + code = fields.Char(string="编号", + default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_salary_approval_code')) diff --git a/yuthon_hr_employee_approval/models/yuthon_service_approval.py b/yuthon_hr_employee_approval/models/yuthon_service_approval.py index 6286818a9..2f463f1eb 100644 --- a/yuthon_hr_employee_approval/models/yuthon_service_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_service_approval.py @@ -7,4 +7,7 @@ class YuthonServiceApproval(models.Model): _inherit = 'soong.workflow.mixin' + name = fields.Char(string='名称') + code = fields.Char(string="编号", + default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_service_approval_code')) \ No newline at end of file diff --git a/yuthon_hr_employee_approval/models/yuthon_system_approval.py b/yuthon_hr_employee_approval/models/yuthon_system_approval.py index 885778713..eedce8c31 100644 --- a/yuthon_hr_employee_approval/models/yuthon_system_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_system_approval.py @@ -7,5 +7,7 @@ class YuthonSystemTitleApproval(models.Model): _inherit = 'soong.workflow.mixin' - name = fields.Char(string='名称') + name = fields.Char(string='名称') + code = fields.Char(string="编号", + default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_system_approval_code')) diff --git a/yuthon_hr_employee_approval/models/yuthon_title_approval.py b/yuthon_hr_employee_approval/models/yuthon_title_approval.py index 233654924..2c543eb85 100644 --- a/yuthon_hr_employee_approval/models/yuthon_title_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_title_approval.py @@ -7,4 +7,7 @@ class YuthonTitleApproval(models.Model): _inherit = 'soong.workflow.mixin' + name = fields.Char(string='名称') + code = fields.Char(string="编号", + default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_title_approval_code')) \ 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 9c4120f44..95882c49a 100644 --- a/yuthon_hr_employee_approval/security/ir.model.access.csv +++ b/yuthon_hr_employee_approval/security/ir.model.access.csv @@ -15,3 +15,7 @@ access_yuthon_salary_approval,yuthon_salary_approval,model_yuthon_salary_approva access_yuthon_service_approval,yuthon_service_approval,model_yuthon_service_approval,base.group_user,1,1,1,1 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_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 diff --git a/yuthon_hr_employee_approval/views/inherit_hr_job_views.xml b/yuthon_hr_employee_approval/views/inherit_hr_job_views.xml new file mode 100644 index 000000000..2eb47d720 --- /dev/null +++ b/yuthon_hr_employee_approval/views/inherit_hr_job_views.xml @@ -0,0 +1,32 @@ + + + + inherit.hr.job.approval.tree + hr.job + + + +
+
+
+
+
+ + + hr.job.approval.inherit.form + hr.job + + +
+ +
+
+
+ + + [('is_pub','=',True)] + +
+ diff --git a/yuthon_hr_employee_approval/views/menuitem.xml b/yuthon_hr_employee_approval/views/menuitem.xml index b21d2f70a..aab536983 100644 --- a/yuthon_hr_employee_approval/views/menuitem.xml +++ b/yuthon_hr_employee_approval/views/menuitem.xml @@ -2,89 +2,97 @@ + + + + + + + + + - - - + sequence="1"/> + sequence="3"/> + sequence="5"/> + sequence="7"/> - + sequence="9"/> + sequence="11"/> + sequence="13"/> + sequence="15"/> + sequence="17"/> + sequence="19"/> + sequence="21"/> + sequence="23"/> \ No newline at end of file diff --git a/yuthon_hr_employee_approval/views/yuthon_account_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_account_approval_views.xml index e056637b6..fe7e18065 100644 --- a/yuthon_hr_employee_approval/views/yuthon_account_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_account_approval_views.xml @@ -6,6 +6,7 @@ + diff --git a/yuthon_hr_employee_approval/views/yuthon_enrollment_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_enrollment_approval_views.xml index 1dc6f4dfc..9e7a23cbe 100644 --- a/yuthon_hr_employee_approval/views/yuthon_enrollment_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_enrollment_approval_views.xml @@ -6,6 +6,7 @@ + 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 8ff8592bb..f35785330 100644 --- a/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml @@ -17,6 +17,7 @@ + diff --git a/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml index 8f003e305..1dec9ac1a 100644 --- a/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml @@ -6,6 +6,7 @@ + diff --git a/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml b/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml index 0c83feac0..412d5df10 100644 --- a/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml @@ -6,6 +6,7 @@ + diff --git a/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml index 3ae29a5c9..163180b6a 100644 --- a/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml @@ -6,7 +6,8 @@ - + + @@ -28,9 +29,8 @@ - + - diff --git a/yuthon_hr_employee_approval/views/yuthon_prepare_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_prepare_approval_views.xml index dff796dbd..deb9c22d6 100644 --- a/yuthon_hr_employee_approval/views/yuthon_prepare_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_prepare_approval_views.xml @@ -15,9 +15,39 @@
- - +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/yuthon_hr_employee_approval/views/yuthon_rank_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_rank_approval_views.xml index d64324526..f352b3875 100644 --- a/yuthon_hr_employee_approval/views/yuthon_rank_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_rank_approval_views.xml @@ -6,6 +6,7 @@ + diff --git a/yuthon_hr_employee_approval/views/yuthon_reassignment_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_reassignment_approval_views.xml index 4cc657b01..7e4602292 100644 --- a/yuthon_hr_employee_approval/views/yuthon_reassignment_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_reassignment_approval_views.xml @@ -6,6 +6,7 @@ + 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 e7e3a90ff..dd91779c4 100644 --- a/yuthon_hr_employee_approval/views/yuthon_recruitment_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_recruitment_approval_views.xml @@ -5,7 +5,16 @@ yuthon.recruitment.approval - + + + + + + + + + + @@ -15,9 +24,55 @@
- - +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -25,7 +80,7 @@ - 待开发 + 招聘需要申请表 yuthon.recruitment.approval tree,form diff --git a/yuthon_hr_employee_approval/views/yuthon_regularization_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_regularization_approval_views.xml index 4389d4ead..f13d43541 100644 --- a/yuthon_hr_employee_approval/views/yuthon_regularization_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_regularization_approval_views.xml @@ -6,6 +6,7 @@ + @@ -15,8 +16,78 @@
- - +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/yuthon_hr_employee_approval/views/yuthon_reward_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_reward_approval_views.xml index a79cb2be5..51ac04ddc 100644 --- a/yuthon_hr_employee_approval/views/yuthon_reward_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_reward_approval_views.xml @@ -6,6 +6,7 @@ + diff --git a/yuthon_hr_employee_approval/views/yuthon_salary_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_salary_approval_views.xml index c42002e01..37153575f 100644 --- a/yuthon_hr_employee_approval/views/yuthon_salary_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_salary_approval_views.xml @@ -6,6 +6,7 @@ + diff --git a/yuthon_hr_employee_approval/views/yuthon_service_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_service_approval_views.xml index 065300458..9fae788c5 100644 --- a/yuthon_hr_employee_approval/views/yuthon_service_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_service_approval_views.xml @@ -6,6 +6,7 @@ + diff --git a/yuthon_hr_employee_approval/views/yuthon_system_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_system_approval_views.xml index fdc2b1e86..c44090277 100644 --- a/yuthon_hr_employee_approval/views/yuthon_system_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_system_approval_views.xml @@ -6,6 +6,7 @@ + diff --git a/yuthon_hr_employee_approval/views/yuthon_title_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_title_approval_views.xml index 6e753ad73..afad3c894 100644 --- a/yuthon_hr_employee_approval/views/yuthon_title_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_title_approval_views.xml @@ -6,6 +6,7 @@ + diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml index ef5249b9b..c8180a8d0 100644 --- a/yuthon_work_brand/views/hr_menus.xml +++ b/yuthon_work_brand/views/hr_menus.xml @@ -1,13 +1,13 @@ - - False - - - + + + + False + False @@ -53,7 +53,7 @@ + sequence="7"/> + + + + + - - - + sequence="1"/> + sequence="3"/> + action="yuthon_hr_employee_approval.yuthon_prepare_approval_action" + sequence="5"/> + sequence="7"/> - + sequence="9"/> + sequence="11"/> + sequence="13"/> + sequence="15"/> + sequence="17"/> + sequence="19"/> + sequence="21"/> + sequence="23"/> - -