diff --git a/soong_workflow/models/soong_user_role.py b/soong_workflow/models/soong_user_role.py index 3a6f7917e..029f75e21 100644 --- a/soong_workflow/models/soong_user_role.py +++ b/soong_workflow/models/soong_user_role.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- from odoo import api, fields, models, _ +from pypinyin import pinyin,lazy_pinyin +from odoo.osv import expression class YuthonUserRole(models.Model): @@ -18,6 +20,7 @@ class YuthonUserRole(models.Model): child_ids = fields.One2many('soong.user.role', 'parent_id', string='子集角色') yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储'), ('thtjbb', '天河投资本部')], string="所属公司", compute='compute_company') + pinyin_name = fields.Char(string="拼音名称", compute='_compute_pinyin', index=True, store=True) @api.depends('department_id') def compute_company(self): @@ -38,4 +41,18 @@ class YuthonUserRole(models.Model): break department = department.parent_id else: - record.yuthon_company = 'thtz' \ No newline at end of file + record.yuthon_company = 'thtz' + + @api.depends('name') + def _compute_pinyin(self): + for employee in self: + employee.pinyin_name = ''.join(lazy_pinyin(employee.name)) + + @api.model + def _name_search(self, name, domain=None, operator='ilike', limit=None, order=None): + domain = domain or [] + if name: + input_pinyin = ''.join(lazy_pinyin(name)) + search_domain = ['|', ('pinyin_name', operator, input_pinyin), ('name', operator, name)] + domain = expression.AND([search_domain, domain]) + return self._search(domain, limit=limit, order=order) diff --git a/soong_workflow/views/soong_user_role_views.xml b/soong_workflow/views/soong_user_role_views.xml index 334d1c15e..c938cbf15 100644 --- a/soong_workflow/views/soong_user_role_views.xml +++ b/soong_workflow/views/soong_user_role_views.xml @@ -10,6 +10,7 @@ + diff --git a/yuthon_contract/models/inherit_hr_contract.py b/yuthon_contract/models/inherit_hr_contract.py index 5060dd808..c6d77bb98 100644 --- a/yuthon_contract/models/inherit_hr_contract.py +++ b/yuthon_contract/models/inherit_hr_contract.py @@ -7,16 +7,9 @@ class HrContract(models.Model): _inherit = "hr.contract" _description = "员工合同拓展" - job_lv_id = fields.Many2one(related='employee_id.job_lv_id', string="职级") code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('contract_code')) resource_calendar_id = fields.Many2one('resource.calendar', string='考勤时间表') - @api.onchange('job_lv_id') - def onchange_salary(self): - for salary in self: - salary.wage = salary.job_lv_id.base_wage - salary.name = '劳动合同' - work_entry_source = fields.Selection([ ('calendar', '考勤安排'), ('attendance', 'Attendances'), diff --git a/yuthon_contract/views/inherit_hr_contract_views.xml b/yuthon_contract/views/inherit_hr_contract_views.xml index 452ad4f20..32e8b46b3 100644 --- a/yuthon_contract/views/inherit_hr_contract_views.xml +++ b/yuthon_contract/views/inherit_hr_contract_views.xml @@ -6,7 +6,6 @@ - diff --git a/yuthon_hr_employee/__manifest__.py b/yuthon_hr_employee/__manifest__.py index b8788b9f9..68854a8c1 100644 --- a/yuthon_hr_employee/__manifest__.py +++ b/yuthon_hr_employee/__manifest__.py @@ -13,19 +13,15 @@ 'website': 'https://www.pengyuthon.com', 'depends': ['base', 'hr', 'hr_recruitment', 'soong_workflow','documents'], 'data': [ - 'data/yuthon.job.lv.csv', - 'data/job_lv_groups_data.xml', 'data/employee_code_data.xml', 'data/abnormal_time_data.xml', 'data/applicant_tage_setting_data.xml', 'data/employee_recruitment_time_data.xml', 'data/publish_applicant_setting_data.xml', 'security/ir.model.access.csv', - 'security/job_lv_security_group.xml', 'security/hr_job_company_security_group.xml', 'views/yuthon_hr_employee_views.xml', 'views/yuthon_hr_department_views.xml', - 'views/yuthon_job_lv_views.xml', 'views/applicant_tage_setting_views.xml', 'views/inherit_res_user_views.xml', 'views/hr_job_type_views.xml', diff --git a/yuthon_hr_employee/data/job_lv_groups_data.xml b/yuthon_hr_employee/data/job_lv_groups_data.xml deleted file mode 100644 index ba2a7d610..000000000 --- a/yuthon_hr_employee/data/job_lv_groups_data.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - 职级管理员 - departmental_role - - - 天河投资职级 - departmental_role - - - 天河物管职级 - departmental_role - - - 天河粮储职级 - departmental_role - - \ No newline at end of file diff --git a/yuthon_hr_employee/models/__init__.py b/yuthon_hr_employee/models/__init__.py index 0059c0c63..1930971bf 100644 --- a/yuthon_hr_employee/models/__init__.py +++ b/yuthon_hr_employee/models/__init__.py @@ -8,5 +8,4 @@ from . import inherit_hr_applicant from . import applicant_tage_setting from . import publish_applicant_setting from . import yuthon_job_postings -from . import inherit_hr_employee diff --git a/yuthon_hr_employee/models/inherit_hr_employee.py b/yuthon_hr_employee/models/inherit_hr_employee.py deleted file mode 100644 index 62c3156cd..000000000 --- a/yuthon_hr_employee/models/inherit_hr_employee.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- -from odoo import api, fields, models - - -class YuthonHrEmployee(models.Model): - _inherit = "hr.employee" - - user_role_ids_changed = fields.Boolean(compute='_compute_user_roles') - - @api.depends('user_role_ids') - def _compute_job_lv_roles(self): - group_mapping = { - '职级管理员': 'group_topic_admin', - '天河投资职级': 'group_party_topic', - '天河物管职级': 'group_team_topic', - '天河粮储职级': 'group_board_topic', - } - - old_users_ids = self.user_role_ids - for employee in self: - for role in employee.user_role_ids: - group_id = group_mapping.get(role.name) - if group_id: - group = self.env.ref('yuthon_issue.' + group_id, raise_if_not_found=False) - if group: - # 未知因素屏蔽选择值 - group.write({'users': [(4, employee.user_id.id)]}) - self.user_role_ids = old_users_ids - self.user_role_ids_changed = True diff --git a/yuthon_hr_employee/models/inherit_hr_job.py b/yuthon_hr_employee/models/inherit_hr_job.py index 58e71e9ba..17d8989c6 100644 --- a/yuthon_hr_employee/models/inherit_hr_job.py +++ b/yuthon_hr_employee/models/inherit_hr_job.py @@ -16,7 +16,6 @@ class HrJob(models.Model): yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储'), ('thtjbb', '天河投资本部')], string="所属公司") job_type_id = fields.Many2one('hr.job.type', string="岗位类别") - job_lv_id = fields.Many2one('yuthon.job.lv', string="职级") start_date = fields.Date(string="生效日期", default=lambda self: fields.Date.today()) end_date = fields.Date(string="失效日期", default=fields.Date.from_string('2099-01-01')) is_enable = fields.Boolean(string="是否启用", default=False, compute='compute_is_enable', store=True) diff --git a/yuthon_hr_employee/models/yuthon_hr_department.py b/yuthon_hr_employee/models/yuthon_hr_department.py index b712f99ba..b3675c76d 100644 --- a/yuthon_hr_employee/models/yuthon_hr_department.py +++ b/yuthon_hr_employee/models/yuthon_hr_department.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from odoo import api, fields, models - +from pypinyin import pinyin,lazy_pinyin +from odoo.osv import expression class YuthonHrDepartment(models.Model): _inherit = "hr.department" @@ -19,6 +20,7 @@ class YuthonHrDepartment(models.Model): end_date = fields.Date(string="结束时间") department_code = fields.Char(string="部门序号") # lower_ids = fields.One2many('hr.department', 'parent_id', string="下级部门") + pinyin_name = fields.Char(string="拼音名称", compute='_compute_pinyin', index=True, store=True) @api.onchange('department_code', 'parent_id') def _onchange_department_code(self): @@ -38,3 +40,19 @@ class YuthonHrDepartment(models.Model): # # cycle_code(self, self.department_code) + @api.depends('name') + def _compute_pinyin(self): + for employee in self: + employee.pinyin_name = ''.join(lazy_pinyin(employee.name)) + + + @api.model + def _name_search(self, name, domain=None, operator='ilike', limit=None, order=None): + domain = domain or [] + if name: + input_pinyin = ''.join(lazy_pinyin(name)) + search_domain = ['|', ('pinyin_name', operator, input_pinyin), ('name', operator, name)] + domain = expression.AND([search_domain, domain]) + return self._search(domain, limit=limit, order=order) + + diff --git a/yuthon_hr_employee/models/yuthon_hr_employee.py b/yuthon_hr_employee/models/yuthon_hr_employee.py index e422a5b99..24922784e 100644 --- a/yuthon_hr_employee/models/yuthon_hr_employee.py +++ b/yuthon_hr_employee/models/yuthon_hr_employee.py @@ -32,7 +32,7 @@ class YuthonHrEmployee(models.Model): user_number = fields.Char(string="员工编号", default=lambda self: self.env['ir.sequence'].next_by_code('employee_code')) use_user_type = fields.Selection([('formal', '正式合同'), ('labor', '劳务协议'), ('part_time', '兼职协议'), ('employment', '用工协议'), ('internship', '实习协议')], string="用工形式") - job_lv_id = fields.Many2one('yuthon.job.lv', string="最新职级") + contract_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], default='thtz', string="合同所属公司") yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), diff --git a/yuthon_hr_employee/models/yuthon_job_lv.py b/yuthon_hr_employee/models/yuthon_job_lv.py index 025dd8427..e685ddd43 100644 --- a/yuthon_hr_employee/models/yuthon_job_lv.py +++ b/yuthon_hr_employee/models/yuthon_job_lv.py @@ -10,50 +10,4 @@ class YuthonJobLv(models.Model): _description = "职级管理" _order = 'sequence asc' - lv = fields.Char(string="级别") - sequence = fields.Char(string='级别序号', store=True) - name = fields.Char(string="职级名称") - base_wage = fields.Float(string="基本工资", group_operator=None) - job_wage = fields.Float(string="职级工资", group_operator=None) - post_wage = fields.Float(string="岗位工资", group_operator=None) - performance_bonus = fields.Float(string="绩效奖金", group_operator=None) - phone_subsidy = fields.Float(string="通信补贴", group_operator=None) - attendance_bonus = fields.Float(string="全勤奖", group_operator=None) - all_wage = fields.Float(string="应发工资", group_operator=None) - comprehensive_subsidy = fields.Float(string="综合补贴", group_operator=None) - yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), - ('thlc', '天河粮储')], string="所属公司") - create_time = fields.Datetime(string="生效日期", default=fields.Datetime.now) - end_time = fields.Datetime(string="失效日期") - - #天河粮储 - post_subsidy = fields.Float(string="岗位补贴(原职级工资)", group_operator=None) - monthly_performance = fields.Float(string="月度绩效", group_operator=None) - duty_pay = fields.Float(string="值班费", group_operator=None) - assignment_subsidy = fields.Float(string="作业环境补贴", group_operator=None) - temporary_performance = fields.Float(string="临时绩效补贴", group_operator=None) - - @api.model - def read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True): - res = super(YuthonJobLv, self).read_group(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, - lazy=lazy) - if 'lv' in groupby: - def sort_by_sequence_number(item): - lv = item.get('lv') - if lv: - rec = self.search([('lv', '=', lv)], limit=1) - if rec and rec.sequence: - match = re.findall(r'\d+', rec.sequence) - if match: - number_str = "".join(match) - try: - number = int(number_str) - return (not number_str.startswith('0'), number) # 取反,首位为0的在前面 - except ValueError: - return (False, 0) # 首位非0的放前面 - return (False, 0) # 首位非0的放前面 - - res.sort(key=sort_by_sequence_number) - return res - - + diff --git a/yuthon_hr_employee/security/job_lv_security_group.xml b/yuthon_hr_employee/security/job_lv_security_group.xml deleted file mode 100644 index 82211df44..000000000 --- a/yuthon_hr_employee/security/job_lv_security_group.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - 职级权限 - - - - 天河投资职级 - - - - - 天河物管职级 - - - - - 天河粮储职级 - - - - - 职级管理员 - - - - - diff --git a/yuthon_hr_employee/views/yuthon_hr_department_views.xml b/yuthon_hr_employee/views/yuthon_hr_department_views.xml index 202da3078..77befe18e 100644 --- a/yuthon_hr_employee/views/yuthon_hr_department_views.xml +++ b/yuthon_hr_employee/views/yuthon_hr_department_views.xml @@ -21,6 +21,7 @@ + diff --git a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml index d273535b6..013a942eb 100644 --- a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml +++ b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml @@ -112,7 +112,6 @@ - @@ -226,8 +225,8 @@ - + @@ -253,6 +252,9 @@ + + hide + diff --git a/yuthon_hr_employee/views/yuthon_job_lv_views.xml b/yuthon_hr_employee/views/yuthon_job_lv_views.xml deleted file mode 100644 index f047a8bc5..000000000 --- a/yuthon_hr_employee/views/yuthon_job_lv_views.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - yuthon.job.lv.tree - yuthon.job.lv - - - - - - - - - - - - - - - - - - - - yuthon.job.lv.search - yuthon.job.lv - - - - - - - - - - - - - - 天河投资职级 - yuthon.job.lv - tree - [('yuthon_company', '=', 'thtz')] - {'search_default_group_lv': 1} - - - - yuthon.job.lv.tree - yuthon.job.lv - - - - - - - - - - - - - - - - - 天河物管职级 - yuthon.job.lv - tree - [('yuthon_company', '=', 'thwg')] - {'search_default_group_lv': 1} - - - - yuthon.job.lv.tree - yuthon.job.lv - - - - - - - - - - - - - - - - - - - - - 天河粮储职级 - yuthon.job.lv - tree - [('yuthon_company', '=', 'thlc')] - - {'search_default_group_lv': 1} - - - - - - - \ 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 index 677ec8594..d639d2cac 100644 --- a/yuthon_hr_employee_approval/models/inherit_hr_job.py +++ b/yuthon_hr_employee_approval/models/inherit_hr_job.py @@ -48,7 +48,6 @@ class HrJob(models.Model): 'hr_job_id':job.id, '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, diff --git a/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py b/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py index 5c6a1100f..d8a023cce 100644 --- a/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py @@ -14,10 +14,8 @@ class YuthonLeavingApproval(models.Model): phone = fields.Char(related='users_id.employee_id.work_phone',string='手机号') yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string="任职单位") - job_id = fields.Many2one(related='users_id.employee_id.job_id', string="主岗") duties = fields.Char(string="职务") - job_lv_id = fields.Many2one(related='users_id.employee_id.job_lv_id', string='职级') job_type_id = fields.Many2one('hr.job.type', string="岗位类别") onboarding_date = fields.Date(related='users_id.employee_id.entry_date',string="入职日期") end_of_contract = fields.Date(string="合同结束日期") diff --git a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py index 215dd14c8..c390c461a 100644 --- a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py @@ -28,7 +28,6 @@ class YuthonOnboardApproval(models.Model): department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string="甲方") - grades_id = fields.Many2one('yuthon.job.lv', string='职级') account = fields.Char(string='账号') bank = fields.Char(string='开户行') onboarding_status = fields.Selection([('none', '待入职'), ('onboarding', '已入职')], string='审批后员工状态', default='none') @@ -107,7 +106,6 @@ class YuthonOnboardApproval(models.Model): 'default_employee_id': employee.id, 'default_date_start': self.duration_employment, 'default_date_end': self.duration_employment_end, - 'default_job_lv_id': self.grades_id.id, }} @api.onchange('employee_name') def _onchange_employee_id(self): diff --git a/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py b/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py index f4d88199e..66d7b31eb 100644 --- a/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py @@ -30,7 +30,7 @@ class YuthonPrepareApproval(models.Model): 'yuthon_company': new.yuthon_company, 'job_type_id': new.job_type_id.id, 'compiling_external': new.compiling_external, - 'job_lv_id': new.job_lv_id.id, + 'establishment_quotas': new.establishment_quotas, 'no_of_employee': new.no_of_employee, 'missing_number': new.missing_number, @@ -48,7 +48,6 @@ class YuthonPrepareApproval(models.Model): 'yuthon_company': prepare.yuthon_company, 'job_type_id': prepare.job_type_id.id, 'compiling_external': prepare.compiling_external, - 'job_lv_id': prepare.job_lv_id.id, 'establishment_quotas': prepare.establishment_quotas, 'no_of_employee': prepare.no_of_employee, 'missing_number': prepare.missing_number, @@ -85,7 +84,6 @@ class PrepareApprovalLine(models.Model): ('thlc', '天河粮储')], string="所属公司") job_type_id = fields.Many2one('hr.job.type', string="岗位类型") compiling_external = fields.Integer(string="编制外人数") - job_lv_id = fields.Many2one('yuthon.job.lv', string="职级") establishment_quotas = fields.Integer(string="编制人数") no_of_employee = fields.Integer(string="当前员工数量") missing_number = fields.Integer(string="缺编人数", compute='_compute_missing_number') @@ -142,7 +140,6 @@ class NewPrepareApprovalLine(models.Model): ('thlc', '天河粮储')], string="所属公司") job_type_id = fields.Many2one('hr.job.type', string="岗位类型") compiling_external = fields.Integer(string="编制外人数") - job_lv_id = fields.Many2one('yuthon.job.lv', string="职级") establishment_quotas = fields.Integer(string="编制人数") no_of_employee = fields.Integer(string="当前员工数量") missing_number = fields.Integer(string="缺编人数",compute='_compute_missing_number') diff --git a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py index ccb385bad..4760213e1 100644 --- a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py @@ -16,7 +16,6 @@ class YuthonReassignmentApproval(models.Model): ('thlc', '天河粮储')], string="任职单位") job_id = fields.Many2one(related='users_id.employee_id.job_id', string="主岗") duties = fields.Char(string="职务") - job_lv_id = fields.Many2one(related='users_id.employee_id.job_lv_id', string='职级') job_type_id = fields.Many2one('hr.job.type', string="岗位类别") onboarding_date = fields.Date(string="任职日期") end_of_contract = fields.Date(related='users_id.employee_id.entry_date',string="入职日期") @@ -40,7 +39,6 @@ class YuthonReassignmentApproval(models.Model): change_parent_id = fields.Many2one("hr.employee", string="直线上级") change_business_superior_id = fields.Many2one("hr.employee", string="业务上级") change_duties = fields.Char(string="职务") - change_job_lv = fields.Many2one('yuthon.job.lv', string='职级') change_department_id = fields.Many2one("hr.department", string="任职部门") change_job_type_id = fields.Many2one('hr.job.type', string="岗位类别") change_job_id = fields.Many2one("hr.job", string="主岗") diff --git a/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py b/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py index 110697f02..fdcaa75b3 100644 --- a/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py @@ -17,7 +17,6 @@ class YuthonRegularizationPrepareApproval(models.Model): yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string="任职单位") job_type_id = fields.Many2one('hr.job.type', string="岗位类别") - job_lv_id = fields.Many2one(related='users_id.employee_id.job_lv_id', string='职级') onboarding_time = fields.Date(related='users_id.employee_id.entry_date',string="入职日期") trial_end_date = fields.Date(string="试用期结束日期") parent_id = fields.Many2one(related='users_id.employee_id.parent_id',string="直线上级") diff --git a/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py b/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py index a1d892d35..1411f1b0c 100644 --- a/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py @@ -17,7 +17,6 @@ class YutransferApproval(models.Model): ('thlc', '天河粮储')], string="所属公司") main_post = fields.Many2one("hr.job", string="主岗") duties = fields.Char(string="职务") - grades = fields.Many2one('yuthon.job.lv', string='职级') job_type_id = fields.Many2one('hr.job.type', string="岗位类别") onboarding_date = fields.Date(string="入职日期") end_of_contract = fields.Date(string="任现职日期") 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 394ce2bd3..816ec4b41 100644 --- a/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml @@ -41,7 +41,6 @@ - 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 bd54cdee7..5e85374f8 100644 --- a/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml @@ -46,7 +46,7 @@ - + @@ -55,7 +55,6 @@ - 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 99c1d3ab0..834f4f622 100644 --- a/yuthon_hr_employee_approval/views/yuthon_prepare_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_prepare_approval_views.xml @@ -44,7 +44,6 @@ - @@ -63,7 +62,6 @@ - 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 9bea3c2b5..49e47d9d2 100644 --- a/yuthon_hr_employee_approval/views/yuthon_reassignment_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_reassignment_approval_views.xml @@ -37,7 +37,6 @@ - @@ -65,7 +64,6 @@ - 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 deee41ceb..27070ba80 100644 --- a/yuthon_hr_employee_approval/views/yuthon_recruitment_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_recruitment_approval_views.xml @@ -43,7 +43,6 @@ - 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 8f252b413..887bb6577 100644 --- a/yuthon_hr_employee_approval/views/yuthon_regularization_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_regularization_approval_views.xml @@ -11,7 +11,6 @@ - @@ -43,7 +42,6 @@ - diff --git a/yuthon_hr_employee_approval/views/yuthon_transfer_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_transfer_approval_views.xml index f862795f2..50a2e9c2b 100644 --- a/yuthon_hr_employee_approval/views/yuthon_transfer_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_transfer_approval_views.xml @@ -34,12 +34,10 @@ - - diff --git a/yuthon_performance/models/yuthon_index_employee.py b/yuthon_performance/models/yuthon_index_employee.py index 08aba9826..bcae593fa 100644 --- a/yuthon_performance/models/yuthon_index_employee.py +++ b/yuthon_performance/models/yuthon_index_employee.py @@ -7,15 +7,17 @@ class YuthonIndexEmployee(models.Model): start_index_time = fields.Date(string='生效时间', required=True) end_index_time = fields.Date(string='失效时间') - users_role_ids = fields.Many2many('soong.user.role', string='角色') + assessment_items = fields.Text(string='考核项目') + score_range_on = fields.Float(string='分值范围') + score_range_off = fields.Float(string='分值范围') + description_score = fields.Text(string='分值说明') + in_charge_role_id = fields.Many2one('soong.user.role', string='角色') + employee_ids = fields.Many2many('hr.employee', string='人员范围') department_ids = fields.Many2many('hr.department', string='部门') - employee_ids = fields.Many2many('hr.employee', string='人员') yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string="所属公司") - dimension = fields.Char('评价维度', required=True) - name = fields.Char('评价维度', required=True) change_employee_library_id = fields.Many2one('yuthon.employee.approval', string='变更指标库') - index_employee_ids = fields.One2many('yuthon.index.employee.line', 'index_employee_id', string='指标库明细') + def put_employees_approval(self): form_id = self.env.ref('yuthon_performance.yuthon_employee_approval_form').id index_applicant_ids = self.env["yuthon.index.employee"].browse( @@ -41,11 +43,4 @@ class YuthonIndexEmployee(models.Model): "name":"员工详情", "view_mode": "form", } -class YuthonIndexEmployeeLine(models.Model): - _name = 'yuthon.index.employee.line' - _description = '员工绩效指标库明细' - - index_employee_id = fields.Many2one('yuthon.index.employee', string="关联员工绩效标准库") - grading_criteria = fields.Char('评分标准') - grading_content = fields.Char('评分内容') diff --git a/yuthon_performance/views/yuthon_employee_approval.xml b/yuthon_performance/views/yuthon_employee_approval.xml index ef4a9ae75..14bc0a3cc 100644 --- a/yuthon_performance/views/yuthon_employee_approval.xml +++ b/yuthon_performance/views/yuthon_employee_approval.xml @@ -51,7 +51,6 @@ - diff --git a/yuthon_performance/views/yuthon_index_employee.xml b/yuthon_performance/views/yuthon_index_employee.xml index 61709a175..feab464c0 100644 --- a/yuthon_performance/views/yuthon_index_employee.xml +++ b/yuthon_performance/views/yuthon_index_employee.xml @@ -9,10 +9,11 @@