diff --git a/yuthon_hr_employee/views/inherit_hr_job_views.xml b/yuthon_hr_employee/views/inherit_hr_job_views.xml
index de03e1f84..d3964cf93 100644
--- a/yuthon_hr_employee/views/inherit_hr_job_views.xml
+++ b/yuthon_hr_employee/views/inherit_hr_job_views.xml
@@ -58,6 +58,7 @@
所属部门
+ 1
1
diff --git a/yuthon_hr_employee_approval/models/yuthon_appointment_approval.py b/yuthon_hr_employee_approval/models/yuthon_appointment_approval.py
index eee45462b..8f5801952 100644
--- a/yuthon_hr_employee_approval/models/yuthon_appointment_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_appointment_approval.py
@@ -36,10 +36,10 @@ class YuthonAppointmentResultIsDetailed(models.Model):
date_of_appointment = fields.Date(string="聘任时间")
appointment_name = fields.Char(string="聘任职称")
- grade = fields.Char(string="等级")
+ grade = fields.Char(string="职称等级")
professional_title = fields.Char(string="职称专业")
is_other = fields.Boolean(string="新增其他专业职称")
cert_code = fields.Char(string="证书编号")
- notice_documents_ids = fields.Many2many('documents.document', string="相关文档")
+ notice_documents_ids = fields.Many2many('documents.document', string="附件")
remarks = fields.Char(string="备注")
\ No newline at end of file
diff --git a/yuthon_hr_employee_approval/views/yuthon_appointment_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_appointment_approval_views.xml
index ecdb784bc..000740138 100644
--- a/yuthon_hr_employee_approval/views/yuthon_appointment_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_appointment_approval_views.xml
@@ -53,30 +53,11 @@
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
diff --git a/yuthon_notice/views/yuthon_notice_views.xml b/yuthon_notice/views/yuthon_notice_views.xml
index 254013ecd..03eba1a27 100644
--- a/yuthon_notice/views/yuthon_notice_views.xml
+++ b/yuthon_notice/views/yuthon_notice_views.xml
@@ -75,8 +75,8 @@
yuthon.notice
-
-
+
+
diff --git a/yuthon_performance/__manifest__.py b/yuthon_performance/__manifest__.py
index 5b3f1b5a1..11119d4d0 100644
--- a/yuthon_performance/__manifest__.py
+++ b/yuthon_performance/__manifest__.py
@@ -10,7 +10,7 @@
'category': 'Human Resources/Attendances',
'version': '0.1',
'license': 'LGPL-3',
- 'depends': ['hr', 'soong_workflow'],
+ 'depends': ['hr', 'soong_workflow',],
'data': [
'security/ir.model.access.csv',
'views/yuthon_Index_management.xml',
@@ -19,7 +19,13 @@
'views/yuthon_plan_management.xml',
'views/yuthon_Index_approval.xml',
'views/yuthon_duty_approval.xml',
+ 'views/yuthon_index_employee.xml',
+ 'views/yuthon_employee_approval.xml',
'views/yuthon_plan_approval.xml',
+ 'views/yuthon_employee_performance.xml',
+ 'views/yuthon_assessment_tasks.xml',
+ 'views/yuthon_grading_tasks.xml',
+ 'views/yuthon_kpi_tasks.xml',
],
'installable': True,
'application': True,
diff --git a/yuthon_performance/models/__init__.py b/yuthon_performance/models/__init__.py
index 794acdad2..0e7072b1e 100644
--- a/yuthon_performance/models/__init__.py
+++ b/yuthon_performance/models/__init__.py
@@ -1,8 +1,13 @@
# -*- coding: utf-8 -*-
-
+from . import yuthon_employee_approval
from . import yuthon_Index_management
from . import yuthon_duty_management
from . import yuthon_plan_management
from . import yuthon_Index_approval
from . import yuthon_duty_approval
+from . import yuthon_index_employee
from . import yuthon_plan_approval
+from . import yuthon_assessment_tasks
+from . import yuthon_employee_performance
+from . import yuthon_grading_tasks
+from . import yuthon_kpi_tasks
\ No newline at end of file
diff --git a/yuthon_performance/models/yuthon_Index_approval.py b/yuthon_performance/models/yuthon_Index_approval.py
index 353dbcce9..ce0287aaf 100644
--- a/yuthon_performance/models/yuthon_Index_approval.py
+++ b/yuthon_performance/models/yuthon_Index_approval.py
@@ -1,7 +1,7 @@
from odoo import models, fields, api, exceptions, _
class YuthonIndexApproval(models.Model):
_name = 'yuthon.index.approval'
- _description = "指标库变更管理"
+ _description = "组织指标库变更管理"
_rec_name = 'name'
name = fields.Char('标题')
@@ -9,4 +9,4 @@ class YuthonIndexApproval(models.Model):
job_id = fields.Many2one('hr.job', string="岗位")
reason_text = fields.Html(string='申请事由')
- change_index_library_ids = fields.One2many("yuthon.index.management",'change_index_library_id',string="指标库变更明细")
+ change_index_library_ids = fields.One2many("yuthon.index.management",'change_index_library_id',string="组织指标库变更明细")
diff --git a/yuthon_performance/models/yuthon_Index_management.py b/yuthon_performance/models/yuthon_Index_management.py
index 1929a1e8f..a5f49828b 100644
--- a/yuthon_performance/models/yuthon_Index_management.py
+++ b/yuthon_performance/models/yuthon_Index_management.py
@@ -1,9 +1,11 @@
-
from odoo import models, fields, api, exceptions, _
+
+
class YuthonIndexManagement(models.Model):
_name = 'yuthon.index.management'
- _description = "指标库"
+ _description = "组织绩效标准库"
+ name = fields.Char('指标库', required=True)
dimension = fields.Char('维度', required=True)
development_goals = fields.Char('发展目标', required=True)
index_name = fields.Char('指标名称', required=True)
@@ -18,20 +20,48 @@ class YuthonIndexManagement(models.Model):
check_norm = fields.Char('考核标准', required=True)
department_ids = fields.Many2many("hr.department", string="指标来源", required=True)
in_charge_role = fields.Many2one('soong.user.role', string='角色')
- employee_id = fields.Many2one('hr.employee', string="员工")
- start_index_time = fields.Date(string='指标生效时间', required=True)
- end_index_time = fields.Date(string='指标失效时间')
+ employee_id = fields.Many2one('hr.employee', string="人员")
+ start_index_time = fields.Date(string='生效时间', required=True)
+ end_index_time = fields.Date(string='失效时间')
unit_compute = fields.Char('计算单位')
weight = fields.Char(string="权重%")
compute_method = fields.Char(string="计算方法")
compute_act = fields.Char(string="计划安排及具体措施/行动")
+
+
change_index_library_id = fields.Many2one("yuthon.index.approval", string="指标库变更明细")
index_duty_id = fields.Many2one('yuthon.duty.management', string="绩效明细")
index_duty_approval_id = fields.Many2one('yuthon.duty.approval', string="部门责任变更明细")
-
-
-
-
-
+ def put_adjustment_approval(self):
+ index_applicant_ids = self.env["yuthon.index.management"].browse(
+ self._context.get('active_ids', self._context.get('active_id')))
+ index_applicant_data = [(6, 0,index_applicant_ids.ids)]
+ form_id = self.env.ref('yuthon_performance.yuthon_index_approval_form').id
+ return {
+ 'name': '指标库变更明细',
+ 'type': 'ir.actions.act_window',
+ 'view_mode': 'form',
+ 'res_model': 'yuthon.index.approval',
+ 'views': [(form_id, 'form')],
+ 'context': {'default_change_index_library_ids': index_applicant_data}
+ }
+ def put_assessment_tasks_approval(self):
+ pass
+ # index_applicant_ids = self.env["yuthon.index.management"].browse(
+ # self._context.get('active_ids', self._context.get('active_id')))
+ # index_applicant_data = [(6, 0,index_applicant_ids.ids)]
+ # form_id = self.env.ref('yuthon_performance.yuthon_duty_management_form').id
+ # if self.index_type == 'kpi':
+ # context = {'default_performance_kpi_ids': index_applicant_data}
+ # else:
+ # context = {'default_performance_gs_ids': index_applicant_data}
+ # return{
+ # 'name': '计划安排及具体措施/行动',
+ # 'type': 'ir.actions.act_window',
+ # 'view_mode': 'form',
+ # 'res_model': 'yuthon.duty.management',
+ # 'views': [(form_id, 'form')],
+ # 'context': context
+ # }
diff --git a/yuthon_performance/models/yuthon_assessment_tasks.py b/yuthon_performance/models/yuthon_assessment_tasks.py
new file mode 100644
index 000000000..f1c0c3e4a
--- /dev/null
+++ b/yuthon_performance/models/yuthon_assessment_tasks.py
@@ -0,0 +1,42 @@
+from odoo import models, fields, api, exceptions, _
+
+
+class YuthonAssessmentTasks(models.Model):
+ _name = 'yuthon.assessment.tasks'
+ _description = '考核任务总汇'
+
+
+ name = fields.Char(string='考核任务名称')
+ index_statu = fields.Selection([('work', '生效'), ('void', '作废')], string='状态')
+ performance_type = fields.Selection([('organize', '组织绩效'), ('employs', '员工绩效')], stroing='考核类型')
+ performance_id = fields.Many2one(
+ 'yuthon.employee.performance',
+ string='Performance Record',
+ ondelete='cascade'
+ )
+ organization_id = fields.Many2one(
+ 'yuthon.duty.management',
+ string='Organization',
+ ondelete='cascade'
+ )
+
+ def buttn_appraisal_ids(self):
+ if self.performance_type == 'organize':
+ res_model = 'yuthon.duty.management'
+ id = self.organization_id.id#
+ else:
+ res_model = 'yuthon.employee.performance'
+ id = self.performance_id.id#
+ self.ensure_one()
+ return {
+ 'type': 'ir.actions.act_window',
+ 'res_model': res_model,
+ 'res_id': id,
+ 'view_mode': 'form',
+ 'target': 'current',
+ }
+ def button_clone_task(self):
+ pass
+
+ def button_calculate_score(self):
+ pass
\ No newline at end of file
diff --git a/yuthon_performance/models/yuthon_duty_approval.py b/yuthon_performance/models/yuthon_duty_approval.py
index 0a034731d..4c8af333d 100644
--- a/yuthon_performance/models/yuthon_duty_approval.py
+++ b/yuthon_performance/models/yuthon_duty_approval.py
@@ -1,4 +1,6 @@
from odoo import models, fields, api, exceptions, _
+
+
class YuthonDutyApproval(models.Model):
_name = 'yuthon.duty.approval'
_description = "部门责任书变更管理"
@@ -10,6 +12,8 @@ class YuthonDutyApproval(models.Model):
reason_text = fields.Html(string='申请事由')
# 指标变更
- # change_duty_kpi_ids = fields.One2many('yuthon.kpi.line', 'change_duty_kpi_id', string="KPI变更明细")
- # change_duty_gs_ids = fields.One2many('yuthon.gs.line', 'change_duty_gs_id', string="GS变更明细")
+ change_duty_kpi_ids = fields.One2many('yuthon.kpi.line', 'change_duty_kpi_id', string="KPI变更明细")
+ change_duty_gs_ids = fields.One2many('yuthon.gs.line', 'change_duty_gs_id', string="GS变更明细")
index_duty_approval_ids = fields.One2many('yuthon.index.management', 'index_duty_approval_id', string="部门责任变更明细")
+
+
diff --git a/yuthon_performance/models/yuthon_duty_management.py b/yuthon_performance/models/yuthon_duty_management.py
index 551ed0ff1..6ac5623e9 100644
--- a/yuthon_performance/models/yuthon_duty_management.py
+++ b/yuthon_performance/models/yuthon_duty_management.py
@@ -3,7 +3,7 @@ from odoo import models, fields, api, exceptions, _
class YuthonDutyManagement(models.Model):
_name = 'yuthon.duty.management'
- _description = "部门责任书"
+ _description = "组织绩效"
_rec_name = 'name'
name = fields.Char('标题')
@@ -13,16 +13,16 @@ class YuthonDutyManagement(models.Model):
('up_half', '上半年'),
('down_half', '下半年'),
('year', '年度'), ], '周期', required=True)
-
department_id = fields.Many2one("hr.department", string="部门", required=True)
start_index_time = fields.Date('指标生效时间')
end_index_time = fields.Date('指标失效时间')
+ assessment_department_id = fields.Many2one("hr.department", string="被考核部门")
index_statu = fields.Selection([('work', '生效'), ('void', '作废')], '状态', required=True)
# 绩效考核
- # performance_kpi_ids = fields.One2many('yuthon.kpi.line', 'performance_kpi_id', string="KPI")
- # performance_gs_ids = fields.One2many('yuthon.gs.line', 'performance_gs_id', string="GS")
+ performance_kpi_ids = fields.One2many('yuthon.kpi.line', 'performance_kpi_id', string="KPI")
+ performance_gs_ids = fields.One2many('yuthon.gs.line', 'performance_gs_id', string="GS")
- index_duty_ids = fields.One2many('yuthon.index.management', 'index_duty_id', string="绩效明细")
+ # index_duty_ids = fields.One2many('yuthon.index.management', 'index_duty_id', string="绩效明细")
@api.onchange('assessment_time', 'cycle', 'department_id')
def _onchange_year_department(self):
@@ -30,24 +30,48 @@ class YuthonDutyManagement(models.Model):
cycle_dict = {'monthly': '月度', 'quarter': '季度', 'up_half': '上半年', 'down_half': '下半年',
'year': '年度'}
cycle_display = cycle_dict.get(self.cycle, self.cycle)
- self.name = f"{self.assessment_time}{cycle_display}{self.department_id.name}责任书"
+ self.name = f"{self.assessment_time}{cycle_display}{self.department_id.name}绩效考核"
+ @api.model_create_multi
+ def create(self, vals_list):
+ performance_records = super().create(vals_list)
+ for performance in performance_records:
+ self.env['yuthon.assessment.tasks'].create({
+ 'name': performance.name, # 使用创建的 performance 记录的 name
+ 'organization_id': performance.id, # 建立关联关系
+ 'index_statu': performance.index_statu,
+ 'performance_type':'organize'
+ })
+ return performance_records
-# class YuthonKpiLine(models.Model):
-# _name = 'yuthon.kpi.line'
-# _description = "KPI明细行"
-#
-# # 链接部门责任书和变更菜单
-# performance_kpi_id = fields.Many2one('yuthon.duty.management', string="KPI")
-# change_duty_kpi_id = fields.Many2one('yuthon.duty.approval', string="KPI变更明细")
+ @api.model
+ def write(self, vals):
+ result = super().write(vals)
+ if result:
+ # 只更新被修改的记录
+ for performance in self:
+ tasks = self.env['yuthon.assessment.tasks'].search([('organization_id', '=', performance.id)])
+ tasks.write({
+ 'name': performance.name,
+ 'index_statu': performance.index_statu
+ })
+ return result
+
+class YuthonKpiLine(models.Model):
+ _name = 'yuthon.kpi.line'
+ _description = "KPI明细行"
+
+ # 链接部门责任书和变更菜单
+ performance_kpi_id = fields.Many2one('yuthon.duty.management', string="KPI")
+ change_duty_kpi_id = fields.Many2one('yuthon.duty.approval', string="KPI变更明细")
#
# KPI
# 指标名称
- # index_name_id = fields.Many2one('yuthon.index.management')
- # duty_index_name = fields.Char(related='index_name_id.index_name', string='考核任务名称', store=True)
+ index_name_id = fields.Many2one('yuthon.index.management')
+ duty_index_name = fields.Char(related='index_name_id.index_name', string='指标名称', store=True)#
-# index_definition_id = fields.Many2one('yuthon.index.management')
-# duty_index_definition = fields.Char(related='index_definition_id.index_definition', string="指标定义")
+ index_definition_id = fields.Many2one('yuthon.index.management')
+ duty_index_definition = fields.Char(related='index_definition_id.index_definition', string="指标定义")
#
# index_id = fields.Many2one('yuthon.index.management')
# duty_index_type = fields.Selection(related='index_id.compute_type', string='计算类别', store=True)
@@ -58,25 +82,30 @@ class YuthonDutyManagement(models.Model):
# duty_employee_id = fields.Many2one('yuthon.index.management')
# employee_id = fields.Many2one('hr.employee', related='duty_employee_id.employee_id', string="员工", store=True)
#
-# unit_compute = fields.Char('计算单位')
-# weight = fields.Char(string="权重%")
+ unit_compute = fields.Char('计算单位')
+ weight = fields.Char(string="权重%")
# compute_method = fields.Char(string="计算方法")
#
#
-# class YuthonGsLine(models.Model):
-# _name = 'yuthon.gs.line'
-# _description = "GS明细行"
+class YuthonGsLine(models.Model):
+ _name = 'yuthon.gs.line'
+ _description = "GS明细行"
#
# # 链接部门责任书和变更菜单
-# performance_gs_id = fields.Many2one('yuthon.duty.management', string="GS")
-# change_duty_gs_id = fields.Many2one('yuthon.duty.approval', string="GS变更明细")
+ performance_gs_id = fields.Many2one('yuthon.duty.management', string="GS")
+ change_duty_gs_id = fields.Many2one('yuthon.duty.approval', string="GS变更明细")
# # index_duty_gs_id = fields.Many2one('yuthon.index.management', string="GS变更明细")
# # 指标名称
-# index_name_id = fields.Many2one('yuthon.index.management')
-# work_task = fields.Char(related='index_name_id.index_name', string="工作任务")
-#
-# compute_act = fields.Char(string="计划安排及具体措施/行动")
+ index_name_id = fields.Many2one('yuthon.index.management')
+ work_task = fields.Char(related='index_name_id.index_name', string="工作任务")
#
+ compute_act = fields.Char(string="计划安排及具体措施/行动")
+ node_target = fields.Char(string="节点目标")
+ quality_objectives = fields.Char(string="质量目标")
+ node_target1 = fields.Char(string="节点目标")
+ quality_objectives1 = fields.Char(string="质量目标")
+ node_target2 = fields.Char(string="节点目标")
+ quality_objectives2 = fields.Char(string="质量目标")
# index_id = fields.Many2one('yuthon.index.management', string='Index')
# duty_index_type = fields.Selection(related='index_id.compute_type', string='计算类别', store=True)
#
@@ -86,4 +115,4 @@ class YuthonDutyManagement(models.Model):
# duty_employee_id = fields.Many2one('yuthon.index.management')
# employee_id = fields.Many2one('hr.employee', string="员工", related='duty_employee_id.employee_id', store=True)
#
-# weight = fields.Char(string="权重%")
+ weight = fields.Char(string="权重%")
diff --git a/yuthon_performance/models/yuthon_employee_approval.py b/yuthon_performance/models/yuthon_employee_approval.py
new file mode 100644
index 000000000..ace8fcbe2
--- /dev/null
+++ b/yuthon_performance/models/yuthon_employee_approval.py
@@ -0,0 +1,14 @@
+from odoo import models, fields, api, exceptions, _
+
+
+class YuthonEmployeeApproval(models.Model):
+ _name = 'yuthon.employee.approval'
+ _description = "员工指标库变更管理"
+ _rec_name = 'name'
+
+ name = fields.Char('标题')
+ creation_time = fields.Datetime(string='申请日期', default=lambda self: fields.Datetime.now())
+ job_id = fields.Many2one('hr.job', string="岗位")
+ reason_text = fields.Html(string='申请事由')
+
+ change_employee_library_ids = fields.One2many("yuthon.index.employee",'change_employee_library_id',string="员工指标库库变更明细")
diff --git a/yuthon_performance/models/yuthon_employee_performance.py b/yuthon_performance/models/yuthon_employee_performance.py
new file mode 100644
index 000000000..4042c22ac
--- /dev/null
+++ b/yuthon_performance/models/yuthon_employee_performance.py
@@ -0,0 +1,53 @@
+from odoo import models, fields, api, exceptions, _
+
+
+class YuthonEmployeePerformance(models.Model):
+ _name = 'yuthon.employee.performance'
+ _description = '员工绩效'
+
+ name = fields.Char('标题')
+ assessment_time = fields.Char('考核时间', required=True)
+ cycle = fields.Selection([('monthly', '月度'),
+ ('quarter', '季度'),
+ ('up_half', '上半年'),
+ ('down_half', '下半年'),
+ ('year', '年度'), ], '周期', required=True)
+ assessment_type = fields.Char('考核类型', required=True)
+ department_id = fields.Many2one("hr.department", string="部门", required=True)
+ start_index_time = fields.Date('指标生效时间')
+ end_index_time = fields.Date('指标失效时间')
+ examiners = fields.Selection([('middle', '中层'),('staff', '普通员工')],string='被考核人')
+ index_statu = fields.Selection([('work', '生效'), ('void', '作废')], '状态', required=True)
+
+ @api.onchange('assessment_time', 'cycle', 'department_id')
+ def _onchange_year_department(self):
+ if self.cycle and self.department_id and self.assessment_time:
+ cycle_dict = {'monthly': '月度', 'quarter': '季度', 'up_half': '上半年', 'down_half': '下半年',
+ 'year': '年度'}
+ cycle_display = cycle_dict.get(self.cycle, self.cycle)
+ self.name = f"{self.assessment_time}{cycle_display}{self.department_id.name}绩效考核"
+
+ @api.model_create_multi
+ def create(self, vals_list):
+ performance_records = super().create(vals_list)
+ for performance in performance_records:
+ self.env['yuthon.assessment.tasks'].create({
+ 'name': performance.name, # 使用创建的 performance 记录的 name
+ 'performance_id': performance.id, # 建立关联关系
+ 'index_statu': performance.index_statu,
+ 'performance_type': 'employs'
+ })
+ return performance_records
+
+ @api.model
+ def write(self, vals):
+ result = super().write(vals)
+ if result:
+ # 只更新被修改的记录
+ for performance in self:
+ tasks = self.env['yuthon.assessment.tasks'].search([('performance_id', '=', performance.id)])
+ tasks.write({
+ 'name': performance.name,
+ 'index_statu': performance.index_statu
+ })
+ return result
diff --git a/yuthon_performance/models/yuthon_grading_tasks.py b/yuthon_performance/models/yuthon_grading_tasks.py
new file mode 100644
index 000000000..f22712f36
--- /dev/null
+++ b/yuthon_performance/models/yuthon_grading_tasks.py
@@ -0,0 +1,30 @@
+from odoo import models, fields, api, exceptions, _
+
+
+class YuthonGradingTasks(models.Model):
+ _name = 'yuthon.grading.tasks'
+ _description = 'GS评分表'
+
+ name = fields.Char(string='名称', required=True)
+ department_id = fields.Many2one("hr.department", string="部门", required=True)
+ index_time = fields.Date(string='时间')
+ gs_ids = fields.One2many("yuthon.gs.detail.lines", "gs_id", string="GS评分表明细行")
+
+
+
+class YuthonGSDetailLines(models.Model):
+ _name = 'yuthon.gs.detail.lines'
+ _description = 'GS评分表明细行'
+#gs指标
+ gs_id = fields.Many2one("yuthon.grading.tasks", string="关联GS评分表")
+ gst_name = fields.Char(string='GS指标名称')
+ weight = fields.Float(string='权重')
+ assessment_tasks = fields.Char(string='上半年考核任务')
+ quality_instructions = fields.Char(string='完成质量说明')
+ node_description = fields.Char(string='完成节点说明')
+ fact_sheet = fields.Char(string='组织绩效办公室核实情况说明')
+ quality_score = fields.Float(string='质量得分')
+ node_score = fields.Float(string='节点得分')
+ total_scores = fields.Float(string='合计得分')
+ score = fields.Float(string='总分')
+
diff --git a/yuthon_performance/models/yuthon_index_employee.py b/yuthon_performance/models/yuthon_index_employee.py
new file mode 100644
index 000000000..8ec0769db
--- /dev/null
+++ b/yuthon_performance/models/yuthon_index_employee.py
@@ -0,0 +1,33 @@
+from odoo import models, fields, api, exceptions, _
+
+
+class YuthonIndexEmployee(models.Model):
+ _name = 'yuthon.index.employee'
+ _description = '员工绩效标准库'
+
+ name = fields.Char('指标库', required=True)
+ dimension = fields.Char('维度', required=True)
+ grading_criteria = fields.Char('评分标准', required=True)
+ start_index_time = fields.Date(string='生效时间', required=True)
+ end_index_time = fields.Date(string='失效时间')
+ in_charge_role = fields.Many2one('soong.user.role', string='角色')
+ department_ids = fields.Many2many('hr.department', string='部门')
+ employee_id = fields.Many2one('hr.employee', string="人员")
+
+ change_employee_library_id = fields.Many2one('yuthon.employee.approval', 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(
+ self._context.get('active_ids', self._context.get('active_id')))
+ index_applicant_data = [(6, 0, index_applicant_ids.ids)]
+ return {
+ 'name': '员工责任变更明细',
+ 'type': 'ir.actions.act_window',
+ 'view_mode': 'form',
+ 'res_model': 'yuthon.employee.approval',
+ 'views': [(form_id,'form')],
+ 'context': {'default_change_employee_library_ids':index_applicant_data
+ }}
+ def put_assessment_tasks1_approval(self):
+ pass
\ No newline at end of file
diff --git a/yuthon_performance/models/yuthon_kpi_tasks.py b/yuthon_performance/models/yuthon_kpi_tasks.py
new file mode 100644
index 000000000..6490b4164
--- /dev/null
+++ b/yuthon_performance/models/yuthon_kpi_tasks.py
@@ -0,0 +1,35 @@
+from odoo import models, fields, api, exceptions, _
+
+
+class YuthonKpiTasks(models.Model):
+ _name = 'yuthon.kpi.tasks'
+ _description = 'KPI Tasks'
+
+
+ name = fields.Char(string='名称', required=True)
+ department_id = fields.Many2one("hr.department", string="部门", required=True)
+ index_time = fields.Date(string='时间')
+ kpi_ids = fields.One2many('yuthon.kpi.detail.lines', 'kpi_id', string='KPI明细')
+
+
+
+
+
+
+class YuthonKpiDetailLines(models.Model):
+ _name = 'yuthon.kpi.detail.lines'
+ _description = 'KPI明细行'
+
+
+ kpi_id = fields.Many2one('yuthon.kpi.tasks', string='KPI任务')
+ weight = fields.Float(string='权重')
+ kpl_name = fields.Char(string='kpl指标')
+ baseline_value = fields.Float(string='底线值')
+ datum_value = fields.Float(string='基准值')
+ efforts_value = fields.Float(string='努力值')
+ calculation_method = fields.Char(string='计算方法')
+ unit = fields.Char(string='计算单位')
+ current_value = fields.Float(string='当前完成值')
+ complete_sheet = fields.Text(string='完成情况说明')
+ score = fields.Float(string='得分')
+ total_score = fields.Float(string='总分')
diff --git a/yuthon_performance/security/ir.model.access.csv b/yuthon_performance/security/ir.model.access.csv
index d04327664..9a740bbc3 100644
--- a/yuthon_performance/security/ir.model.access.csv
+++ b/yuthon_performance/security/ir.model.access.csv
@@ -4,7 +4,15 @@ access_yuthon_duty_management,yuthon_duty_management,model_yuthon_duty_managemen
access_yuthon_plan_management,yuthon_plan_management,model_yuthon_plan_management,base.group_user,1,1,1,1
access_yuthon_plan_management_line,yuthon_plan_management_line,model_yuthon_plan_management_line,base.group_user,1,1,1,1
access_yuthon_index_approval,yuthon_index_approval,model_yuthon_index_approval,base.group_user,1,1,1,1
+access_yuthon_kpi_line,yuthon_kpi_line,model_yuthon_kpi_line,base.group_user,1,1,1,1
+access_yuthon_gs_line,yuthon_gs_line,model_yuthon_gs_line,base.group_user,1,1,1,1
access_yuthon_duty_approval,yuthon_duty_approval,model_yuthon_duty_approval,base.group_user,1,1,1,1
access_yuthon_plan_approval,yuthon_plan_approval,model_yuthon_plan_approval,base.group_user,1,1,1,1
-
-
+access_yuthon_index_employee,yuthon_index_employee,model_yuthon_index_employee,base.group_user,1,1,1,1
+access_yuthon_employee_approval,yuthon_employee_approval,model_yuthon_employee_approval,base.group_user,1,1,1,1
+access_yuthon_assessment_tasks,yuthon_assessment_tasks,model_yuthon_assessment_tasks,base.group_user,1,1,1,1
+access_yuthon_employee_performance,yuthon_employee_performance,model_yuthon_employee_performance,base.group_user,1,1,1,1
+access_yuthon_grading_tasks,yuthon_grading_tasks,model_yuthon_grading_tasks,base.group_user,1,1,1,1
+access_yuthon_gs_detail_lines,yuthon_gs_detail_lines,model_yuthon_gs_detail_lines,base.group_user,1,1,1,1
+access_yuthon_kpi_detail_lines,yuthon_kpi_detail_lines,model_yuthon_kpi_detail_lines,base.group_user,1,1,1,1
+access_yuthon_kpi_tasks,yuthon_kpi_tasks,model_yuthon_kpi_tasks,base.group_user,1,1,1,1
diff --git a/yuthon_performance/views/yuthon_Index_approval.xml b/yuthon_performance/views/yuthon_Index_approval.xml
index 8fcfbbac6..2a6d59946 100644
--- a/yuthon_performance/views/yuthon_Index_approval.xml
+++ b/yuthon_performance/views/yuthon_Index_approval.xml
@@ -34,7 +34,7 @@
-
+
@@ -70,7 +70,7 @@
- 指标库变更
+ 组织指标库变更
yuthon.index.approval
tree,form
diff --git a/yuthon_performance/views/yuthon_Index_management.xml b/yuthon_performance/views/yuthon_Index_management.xml
index 9918c20a8..efc76ec31 100644
--- a/yuthon_performance/views/yuthon_Index_management.xml
+++ b/yuthon_performance/views/yuthon_Index_management.xml
@@ -6,6 +6,10 @@
yuthon.index.management
+
@@ -22,11 +26,49 @@
+
+ yuthon.index.management.form
+ yuthon.index.management
+
+
+
+
- 指标库
+ 组织绩效
yuthon.index.management
- tree
+ tree,form
\ No newline at end of file
diff --git a/yuthon_performance/views/yuthon_assessment_tasks.xml b/yuthon_performance/views/yuthon_assessment_tasks.xml
new file mode 100644
index 000000000..aa0b41624
--- /dev/null
+++ b/yuthon_performance/views/yuthon_assessment_tasks.xml
@@ -0,0 +1,32 @@
+
+
+
+ yuthon.assessment.tasks.tree
+ yuthon.assessment.tasks
+
+
+
+
+
+
+
+
+
+
+
+
+ yuthon.assessment.tasks.search
+ yuthon.assessment.tasks
+
+
+
+
+
+
+
+ 考核任务
+ yuthon.assessment.tasks
+ tree
+
+
+
\ No newline at end of file
diff --git a/yuthon_performance/views/yuthon_duty_management.xml b/yuthon_performance/views/yuthon_duty_management.xml
index a68a5ae59..3fd14ad06 100644
--- a/yuthon_performance/views/yuthon_duty_management.xml
+++ b/yuthon_performance/views/yuthon_duty_management.xml
@@ -32,6 +32,7 @@
+
@@ -39,44 +40,51 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+ yuthon.duty.management.tree2
+ yuthon.duty.management
+
+
+
+
+
+
+
+
部门责任书
diff --git a/yuthon_performance/views/yuthon_employee_approval.xml b/yuthon_performance/views/yuthon_employee_approval.xml
new file mode 100644
index 000000000..3ee0bd74c
--- /dev/null
+++ b/yuthon_performance/views/yuthon_employee_approval.xml
@@ -0,0 +1,72 @@
+
+
+
+
+ yuthon.employee.approval.tree
+ yuthon.employee.approval
+
+
+
+
+
+
+
+
+
+ yuthon.employee.approval.form
+ yuthon.employee.approval
+
+
+
+
+
+
+ yuthon.employee.approval.search
+ yuthon.employee.approval
+
+
+
+
+
+
+
+
+ 员工指标库变更
+ yuthon.employee.approval
+ tree,form
+
+
+
\ No newline at end of file
diff --git a/yuthon_performance/views/yuthon_employee_performance.xml b/yuthon_performance/views/yuthon_employee_performance.xml
new file mode 100644
index 000000000..827e2b434
--- /dev/null
+++ b/yuthon_performance/views/yuthon_employee_performance.xml
@@ -0,0 +1,50 @@
+
+
+
+ yuthon.employee.performance.tree
+ yuthon.employee.performance
+
+
+
+
+
+
+
+
+
+
+
+ yuthon.employee.performance.form
+ yuthon.employee.performance
+
+
+
+
+
+ 员工绩效
+ yuthon.employee.performance
+ tree,form
+
+
\ No newline at end of file
diff --git a/yuthon_performance/views/yuthon_grading_tasks.xml b/yuthon_performance/views/yuthon_grading_tasks.xml
new file mode 100644
index 000000000..453be738b
--- /dev/null
+++ b/yuthon_performance/views/yuthon_grading_tasks.xml
@@ -0,0 +1,62 @@
+
+
+
+
+ yuthon.grading.tasks.tree
+ yuthon.grading.tasks
+
+
+
+
+
+
+
+
+
+ yuthon.grading.tasks.form
+ yuthon.grading.tasks
+
+
+
+
+
+
+ GS评分表
+ yuthon.grading.tasks
+ tree,form
+
+
\ No newline at end of file
diff --git a/yuthon_performance/views/yuthon_index_employee.xml b/yuthon_performance/views/yuthon_index_employee.xml
new file mode 100644
index 000000000..bf5fdf572
--- /dev/null
+++ b/yuthon_performance/views/yuthon_index_employee.xml
@@ -0,0 +1,59 @@
+
+
+
+ yuthon.index.employee.tree
+ yuthon.index.employee
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ yuthon.index.employee.form
+ yuthon.index.employee
+
+
+
+
+
+ 员工绩效
+ yuthon.index.employee
+ tree,form
+
+
\ No newline at end of file
diff --git a/yuthon_performance/views/yuthon_kpi_tasks.xml b/yuthon_performance/views/yuthon_kpi_tasks.xml
new file mode 100644
index 000000000..f1aa3cc5b
--- /dev/null
+++ b/yuthon_performance/views/yuthon_kpi_tasks.xml
@@ -0,0 +1,64 @@
+
+
+
+
+ yuthon.kpi.tasks.tree
+ yuthon.kpi.tasks
+
+
+
+
+
+
+
+
+
+ yuthon.kpi.tasks.form
+ yuthon.kpi.tasks
+
+
+
+
+
+
+ KPI评分表
+ yuthon.kpi.tasks
+ tree,form
+
+
diff --git a/yuthon_performance/views/yuthon_performance_menus.xml b/yuthon_performance/views/yuthon_performance_menus.xml
index e757aeb80..e78421f3e 100644
--- a/yuthon_performance/views/yuthon_performance_menus.xml
+++ b/yuthon_performance/views/yuthon_performance_menus.xml
@@ -33,6 +33,12 @@
name="员工绩效指标库"
sequence="3"
action="yuthon_index_management_action"/>
+
+
+
+
+
+
diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml
index 8128e5493..bf64c9c5c 100644
--- a/yuthon_work_brand/views/hr_menus.xml
+++ b/yuthon_work_brand/views/hr_menus.xml
@@ -133,7 +133,7 @@
+ action="yuthon_performance.yuthon_index_employee_action"/>
+
+
+
+ sequence="5"
+ action="yuthon_performance.yuthon_employee_performance_action"/>
+ sequence="7"/>
+
+