From f55bf43008e89cf984176a06119501e631854ac6 Mon Sep 17 00:00:00 2001
From: zhouzhou <123@qq.com>
Date: Sat, 30 Nov 2024 19:43:00 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
soong_workflow/models/soong_approval_users.py | 2 +-
soong_workflow/models/soong_hr_employee.py | 4 +-
soong_workflow/models/soong_note_setting.py | 2 +-
soong_workflow/models/soong_workflow.py | 2 +-
soong_workflow/models/soong_workflow_node.py | 2 +-
.../views/hr_attendance_views.xml | 20 +-
.../wizard/attendance_iot_manager_wizard.py | 2 +-
yuthon_issue/models/issue_library.py | 2 +-
.../models/yuthon_lessee_notice.py | 2 +-
yuthon_official/models/yuthon_official.py | 2 +-
.../yuthon_official_incoming_normal_views.xml | 2 -
yuthon_performance/__manifest__.py | 2 +
yuthon_performance/models/__init__.py | 2 +
.../models/yuthon_Index_approval.py | 2 +-
.../models/yuthon_Index_management.py | 4 +-
.../models/yuthon_departmental_responsible.py | 9 +
.../models/yuthon_duty_management.py | 40 +++-
.../models/yuthon_employee_approval.py | 4 +-
.../models/yuthon_employee_performance.py | 2 +-
.../models/yuthon_index_employee.py | 2 +-
.../models/yuthon_personal_logs.py | 11 +
.../models/yuthon_plan_management.py | 39 +++-
.../security/ir.model.access.csv | 4 +-
.../security/yuthon_performance_security.xml | 49 +++++
.../views/yuthon_Index_management.xml | 10 +-
.../yuthon_departmental_responsible_views.xml | 30 +++
.../views/yuthon_duty_management.xml | 39 ++--
.../views/yuthon_personal_logs_views.xml | 36 ++++
.../views/yuthon_plan_management.xml | 189 ++++++++++++++++--
yuthon_work_brand/views/performance_menu.xml | 36 +++-
30 files changed, 465 insertions(+), 87 deletions(-)
create mode 100644 yuthon_performance/models/yuthon_departmental_responsible.py
create mode 100644 yuthon_performance/models/yuthon_personal_logs.py
create mode 100644 yuthon_performance/security/yuthon_performance_security.xml
create mode 100644 yuthon_performance/views/yuthon_departmental_responsible_views.xml
create mode 100644 yuthon_performance/views/yuthon_personal_logs_views.xml
diff --git a/soong_workflow/models/soong_approval_users.py b/soong_workflow/models/soong_approval_users.py
index a7cb80b9f..fb518fc4b 100644
--- a/soong_workflow/models/soong_approval_users.py
+++ b/soong_workflow/models/soong_approval_users.py
@@ -22,7 +22,7 @@ class SoongApprovalUsers(models.Model):
res_model = fields.Char('Workflow Ref Model', index=True, related='res_model_id.model', precompute=True, store=True, readonly=True)
res_id = fields.Many2oneReference(string='Workflow Ref.', index=True, model_field='res_model')
approval_user_id = fields.Many2one('res.users', string='审批人')
- approval_user = fields.Many2one('soong.user.role', string='审批角色')
+ approval_user = fields.Many2one('soong.user.role', string='审批角色', domain=[('user_type', '!=', 'lv_role')])
approval_user_datetime = fields.Datetime(string='审批时间')
approval_user_notice = fields.Char(string='审批意见')
approval_user_state = fields.Selection([('will', '待审批')], string='状态')
diff --git a/soong_workflow/models/soong_hr_employee.py b/soong_workflow/models/soong_hr_employee.py
index 2db4227c5..72f6e8bc5 100644
--- a/soong_workflow/models/soong_hr_employee.py
+++ b/soong_workflow/models/soong_hr_employee.py
@@ -8,6 +8,6 @@ class YuthonHrEmployee(models.Model):
"""
_inherit = "hr.employee"
- user_role_id = fields.Many2one('soong.user.role', string="主角色", store=True)
- user_role_ids = fields.Many2many('soong.user.role', string="辅助角色", store=True)
+ user_role_id = fields.Many2one('soong.user.role', string="主角色", store=True, domain=[('user_type', '!=', 'lv_role')])
+ user_role_ids = fields.Many2many('soong.user.role', string="辅助角色", store=True, domain=[('user_type', '!=', 'lv_role')])
department_ids = fields.Many2many('hr.department', string="辅助部门", store=True)
\ No newline at end of file
diff --git a/soong_workflow/models/soong_note_setting.py b/soong_workflow/models/soong_note_setting.py
index dda5b1d75..cc972b59e 100644
--- a/soong_workflow/models/soong_note_setting.py
+++ b/soong_workflow/models/soong_note_setting.py
@@ -6,4 +6,4 @@ class SoongNoteSetting(models.Model):
_name = 'soong.note.setting'
name = fields.Char(string="名称")
- users_role_ids = fields.Many2many('soong.user.role', string='角色范围')
\ No newline at end of file
+ users_role_ids = fields.Many2many('soong.user.role', string='角色范围', domain=[('user_type', '!=', 'lv_role')])
\ No newline at end of file
diff --git a/soong_workflow/models/soong_workflow.py b/soong_workflow/models/soong_workflow.py
index 36b7bbc6f..8c6a8db2c 100644
--- a/soong_workflow/models/soong_workflow.py
+++ b/soong_workflow/models/soong_workflow.py
@@ -52,7 +52,7 @@ class SoongWorkflow(models.Model):
is_enable_transmitted_button = fields.Boolean(string="是否启用转交", default=True)
approvals_group_id = fields.Many2one('soong.approval.group', string="审批分组")
user_role_ids = fields.Many2many('soong.user.role', string="角色", store=True,
- default=lambda self: [(6, 0, [self.env.ref('soong_workflow.soong_user_role_workflow_admin').id])])
+ default=lambda self: [(6, 0, [self.env.ref('soong_workflow.soong_user_role_workflow_admin').id])], domain=[('user_type', '!=', 'lv_role')])
def copy(self, default=None):
workflow_id = self.search([('model_id', '=', self.model_id.id)])
diff --git a/soong_workflow/models/soong_workflow_node.py b/soong_workflow/models/soong_workflow_node.py
index b3951c09f..b556c4359 100644
--- a/soong_workflow/models/soong_workflow_node.py
+++ b/soong_workflow/models/soong_workflow_node.py
@@ -252,7 +252,7 @@ class SoongWorkflowNodeButton(models.Model):
)
reviewer_id = fields.Many2one(comodel_name="res.users", string="Reviewer")
reviewer_group_id = fields.Many2one(comodel_name="res.groups", string="Reviewer group")
- users_role_id = fields.Many2one(comodel_name="soong.user.role", string="主角色")
+ users_role_id = fields.Many2one(comodel_name="soong.user.role", string="主角色", domain=[('user_type', '!=', 'lv_role')])
reviewer_expression = fields.Text(
string="Review Expression",
default=CONDITION_CODE_TEMP,
diff --git a/yuthon_hr_attendance/views/hr_attendance_views.xml b/yuthon_hr_attendance/views/hr_attendance_views.xml
index bda5d2729..ef810d936 100644
--- a/yuthon_hr_attendance/views/hr_attendance_views.xml
+++ b/yuthon_hr_attendance/views/hr_attendance_views.xml
@@ -22,16 +22,26 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
出勤
diff --git a/yuthon_hr_attendance/wizard/attendance_iot_manager_wizard.py b/yuthon_hr_attendance/wizard/attendance_iot_manager_wizard.py
index eaa7f6b53..85c6b8bcf 100644
--- a/yuthon_hr_attendance/wizard/attendance_iot_manager_wizard.py
+++ b/yuthon_hr_attendance/wizard/attendance_iot_manager_wizard.py
@@ -9,7 +9,7 @@ class AttendanceIotManagerWizard(models.TransientModel):
attendance_iot_id = fields.Many2one('attendance.iot', string="设备号")
department_ids = fields.Many2many('hr.department', string='部门范围')
employee_ids = fields.Many2many('hr.employee', string='人员范围')
- users_role_ids = fields.Many2many('soong.user.role', string='角色范围')
+ users_role_ids = fields.Many2many('soong.user.role', string='角色范围', domain=[('user_type', '!=', 'lv_role')])
iot_users_ids = fields.Many2many('res.users', string="人员", compute="compute_iot_users_ids", store=True)
@api.depends('department_ids', 'employee_ids', 'users_role_ids')
diff --git a/yuthon_issue/models/issue_library.py b/yuthon_issue/models/issue_library.py
index e0c7a115b..8e71b9cc4 100644
--- a/yuthon_issue/models/issue_library.py
+++ b/yuthon_issue/models/issue_library.py
@@ -38,7 +38,7 @@ class IssueLibrary(models.Model):
department_id = fields.Many2one('hr.department', string='部门', related='employee_id.department_id')
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
('thlc', '天河粮储')], string="所属公司", related='employee_id.yuthon_company')
- users_role_ids = fields.Many2many('soong.user.role', string='角色范围', related='employee_id.user_role_ids')
+ users_role_ids = fields.Many2many('soong.user.role', string='角色范围', related='employee_id.user_role_ids', domain=[('user_type', '!=', 'lv_role')])
approval_name = fields.Char(string="审批标题")
meeting_place = fields.Char(string="会议地点")
meeting_name = fields.Char(string="会议名称")
diff --git a/yuthon_lessee_service/models/yuthon_lessee_notice.py b/yuthon_lessee_service/models/yuthon_lessee_notice.py
index 84a2c2301..bfcee04ff 100644
--- a/yuthon_lessee_service/models/yuthon_lessee_notice.py
+++ b/yuthon_lessee_service/models/yuthon_lessee_notice.py
@@ -15,7 +15,7 @@ class YuthonLesseeNotice(models.Model):
department_id = fields.Many2one(related='user_id.employee_id.department_id', string="部门")
department_ids = fields.Many2many('hr.department', string='部门范围')
employee_ids = fields.Many2many('hr.employee', string='人员范围')
- users_role_ids = fields.Many2many('soong.user.role', string='角色范围')
+ users_role_ids = fields.Many2many('soong.user.role', string='角色范围', domain=[('user_type', '!=', 'lv_role')])
company_page = fields.Selection([('tz', '天河投资'), ('wg', '天河物管'), ('lc', '天河粮储')], string="公司", compute="_compute_company", store=True)
notice_type_id = fields.Many2one('yuthon.notice.type', string="类型")
create_date = fields.Date(string="发布日期")
diff --git a/yuthon_official/models/yuthon_official.py b/yuthon_official/models/yuthon_official.py
index e7caa25df..12c69867a 100644
--- a/yuthon_official/models/yuthon_official.py
+++ b/yuthon_official/models/yuthon_official.py
@@ -23,7 +23,7 @@ class YuthonOfficial(models.Model):
copy_flats = fields.Char(string="抄送")
department_ids = fields.Many2many('hr.department', string='部门范围')
employee_ids = fields.Many2many('hr.employee', string='人员范围')
- users_role_ids = fields.Many2many('soong.user.role', string='角色范围')
+ users_role_ids = fields.Many2many('soong.user.role', string='角色范围', domain=[('user_type', '!=', 'lv_role')])
servings_number = fields.Integer(string="份数")
urgency = fields.Selection([('normal', '一般'), ('urgent', '紧急'), ('extra_urgent', '特急')], string="紧急程度")
secret_level = fields.Selection([('normal', '一般'), ('urgent', '秘密'), ('secret', '机密'), ('so_secret', '绝密')], string="密级")
diff --git a/yuthon_official/views/yuthon_official_incoming_normal_views.xml b/yuthon_official/views/yuthon_official_incoming_normal_views.xml
index 630c8a6f5..56553958b 100644
--- a/yuthon_official/views/yuthon_official_incoming_normal_views.xml
+++ b/yuthon_official/views/yuthon_official_incoming_normal_views.xml
@@ -25,11 +25,9 @@
-
-
diff --git a/yuthon_performance/__manifest__.py b/yuthon_performance/__manifest__.py
index 2f064b4ed..99aebe12f 100644
--- a/yuthon_performance/__manifest__.py
+++ b/yuthon_performance/__manifest__.py
@@ -18,6 +18,8 @@
'views/yuthon_duty_management.xml',
'views/yuthon_performance_menus.xml',
'views/yuthon_plan_management.xml',
+ 'views/yuthon_departmental_responsible_views.xml',
+ 'views/yuthon_personal_logs_views.xml',
'views/yuthon_Index_approval.xml',
'views/yuthon_tissue_duty_approval.xml',
'views/yuthon_index_employee.xml',
diff --git a/yuthon_performance/models/__init__.py b/yuthon_performance/models/__init__.py
index 9525a551b..794556b5b 100644
--- a/yuthon_performance/models/__init__.py
+++ b/yuthon_performance/models/__init__.py
@@ -12,3 +12,5 @@ from . import yuthon_employee_performance
from . import yuthon_grading_tasks
from . import yuthon_kpi_tasks
from . import yuthon_employee_appraisal
+from . import yuthon_departmental_responsible
+from . import yuthon_personal_logs
\ 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 017ccbf39..8a1cd31b9 100644
--- a/yuthon_performance/models/yuthon_Index_approval.py
+++ b/yuthon_performance/models/yuthon_Index_approval.py
@@ -62,7 +62,7 @@ class NewIndexManagement(models.Model):
('two_index', '双向指标'), ], '计算类别')
new_check_norm = fields.Char('考核标准', required=True)
new_department_ids = fields.Many2many("hr.department", string="指标来源", required=True)
- new_in_charge_role_id = fields.Many2one('soong.user.role', string='角色')
+ new_in_charge_role_id = fields.Many2one('soong.user.role', string='角色', domain=[('user_type', '!=', 'lv_role')])
new_employee_ids = fields.Many2many('hr.employee', string="人员")
new_start_index_time = fields.Date(string='生效时间', required=True)
new_end_index_time = fields.Date(string='失效时间')
diff --git a/yuthon_performance/models/yuthon_Index_management.py b/yuthon_performance/models/yuthon_Index_management.py
index b1ed46bd2..1f9affaf8 100644
--- a/yuthon_performance/models/yuthon_Index_management.py
+++ b/yuthon_performance/models/yuthon_Index_management.py
@@ -13,7 +13,7 @@ class YuthonIndexManagement(models.Model):
index_definition = fields.Text('指标定义')
index_type = fields.Selection([('kpi', 'KPI'),
('gs', 'GS'), ('no', '否决指标')],'指标类别')
- index_compute = fields.Char('指标计算公式')
+ index_compute = fields.Text('指标计算公式')
compute_type = fields.Selection([('bad_index', '反向指标'),
('good_index', '正向指标'),
('two_index', '双向指标'),],'计算类别')
@@ -21,7 +21,7 @@ class YuthonIndexManagement(models.Model):
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
('thlc', '天河粮储')], string="所属公司")
department_ids = fields.Many2many("hr.department", string="指标来源")
- in_charge_role_id = fields.Many2one('soong.user.role', string='角色')
+ in_charge_role_id = fields.Many2one('soong.user.role', string='角色', domain=[('user_type', '!=', 'lv_role')])
employee_ids = fields.Many2many('hr.employee', string='人员范围')
start_index_time = fields.Date(string='生效时间', default=fields.Date.today())
end_index_time = fields.Date(string='失效时间')
diff --git a/yuthon_performance/models/yuthon_departmental_responsible.py b/yuthon_performance/models/yuthon_departmental_responsible.py
new file mode 100644
index 000000000..6ec4401e3
--- /dev/null
+++ b/yuthon_performance/models/yuthon_departmental_responsible.py
@@ -0,0 +1,9 @@
+from odoo import models, fields, api, exceptions, _
+
+
+class YuthonDepartmentalResponsible(models.Model):
+ _name = 'yuthon.departmental.responsible'
+ _description = '本部门责任书'
+
+
+ name = fields.Char(string='责任书名称')
\ No newline at end of file
diff --git a/yuthon_performance/models/yuthon_duty_management.py b/yuthon_performance/models/yuthon_duty_management.py
index 18d0464fd..dd9aeb01a 100644
--- a/yuthon_performance/models/yuthon_duty_management.py
+++ b/yuthon_performance/models/yuthon_duty_management.py
@@ -1,10 +1,12 @@
from odoo import models, fields, api, exceptions, _
-from datetime import datetime
+import datetime
+
class YuthonDutyManagement(models.Model):
_name = 'yuthon.duty.management'
_description = "组织绩效"
_rec_name = 'name'
+ _inherit = ['soong.workflow.mixin']
name = fields.Char('标题')
cycle = fields.Selection([('monthly', '月度'),
@@ -12,13 +14,18 @@ class YuthonDutyManagement(models.Model):
('up_half', '上半年'),
('down_half', '下半年'),
('year', '年度'), ], '周期', required=True)
+ select_time = fields.Selection([('January', '一月'), ('February', '二月'), ('March', '三月'), ('April', '四月'),
+ ('May', '五月'), ('June', '六月'), ('July', '七月'), ('July', '八月'),
+ ('September', '九月'), ('October', '十月'), ('November', '十一月'), ('December', '十二月')
+ , ('half', '上半年'), ('later', '下半年'), ('year', '年度')], string='月份',
+ default=lambda self: self._get_default_month())
+ select_quarter = fields.Selection([('one', '第一季度'), ('two', '第二季度'), ('three', '第三季度'), ('four', '第四季度')]
+ , string='季度')
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
('thlc', '天河粮储')], string="所属公司")
- department_id = fields.Many2one("hr.department", string="部门", required=True)
+ department_id = fields.Many2one("hr.department", string="被考核部门", required=True)
start_index_time = fields.Date('指标生效时间')
end_index_time = fields.Date('指标失效时间')
- users_role_ids = fields.Many2many('soong.user.role', string='被考核角色')
- users_ids = fields.Many2many('hr.employee', string='被考核人员')
total_weights = fields.Float('总权重')
# 绩效考核
performance_kpi_ids = fields.One2many('yuthon.kpi.line', 'performance_kpi_id', string="KPI")
@@ -45,16 +52,35 @@ class YuthonDutyManagement(models.Model):
})
return performance_records
+ @api.model
+ def _get_default_month(self):
+ current_month = datetime.datetime.now().strftime("%B")
+ month_mapping_cn = {
+ "一月": "January",
+ "二月": "February",
+ "三月": "March",
+ "四月": "April",
+ "五月": "May",
+ "六月": "June",
+ "七月": "July",
+ "八月": "August",
+ "九月": "September",
+ "十月": "October",
+ "十一月": "November",
+ "十二月": "December",
+ }
+ return month_mapping_cn.get(current_month)
+
@api.model
def _get_assessment_time_options(self):
- current_year = int(self.assessment_time) if self.assessment_time else datetime.now().year
+ current_year = int(self.assessment_time) if self.assessment_time else datetime.datetime.now().year
return [(str(year), str(year)) for year in range(current_year, current_year + 2)]
assessment_time = fields.Selection(
selection='_get_assessment_time_options',
- string='考核时间',
+ string='考核周期',
required=True,
- default=lambda self: str(datetime.now().year)
+ default=lambda self: str(datetime.datetime.now().year)
)
@api.model
diff --git a/yuthon_performance/models/yuthon_employee_approval.py b/yuthon_performance/models/yuthon_employee_approval.py
index d210a8c7a..b11dc674c 100644
--- a/yuthon_performance/models/yuthon_employee_approval.py
+++ b/yuthon_performance/models/yuthon_employee_approval.py
@@ -20,7 +20,7 @@ class YuthonEmployeeApproval(models.Model):
change_employee_library_ids = fields.One2many("yuthon.index.employee",'change_employee_library_id',string="员工指标库库变更明细")
new_change_employee_library_ids = fields.One2many("new.employee.library.line",'new_change_employee_library_id',string="新员工指标库变更明细")
- users_role_ids = fields.Many2many('soong.user.role', string='被考核角色')
+ users_role_ids = fields.Many2many('soong.user.role', string='被考核角色', domain=[('user_type', '!=', 'lv_role')])
@api.onchange('change_employee_library_ids')
def _onchange_change_employee_library_ids(self):
@@ -43,7 +43,7 @@ class NewEmployeeLibraryLine(models.Model):
new_change_employee_library_id = fields.Many2one('yuthon.employee.approval', string='关联员工指标库变更')
- new_users_role_ids = fields.Many2many('soong.user.role', string='角色')
+ new_users_role_ids = fields.Many2many('soong.user.role', string='角色', domain=[('user_type', '!=', 'lv_role')])
new_department_ids = fields.Many2many('hr.department', string='部门')
new_employee_ids = fields.Many2many('hr.employee', string='人员')
new_dimension = fields.Char('评价维度', required=True)
diff --git a/yuthon_performance/models/yuthon_employee_performance.py b/yuthon_performance/models/yuthon_employee_performance.py
index 70f223ba8..9cbbf5610 100644
--- a/yuthon_performance/models/yuthon_employee_performance.py
+++ b/yuthon_performance/models/yuthon_employee_performance.py
@@ -64,7 +64,7 @@ class YuthonRoleDetailLines(models.Model):
role_id = fields.Many2one('yuthon.employee.performance', string="关联员工绩效(考核任务)")
organization_id = fields.Many2one('yuthon.duty.management', string='组织绩效考核角色明细行')
- in_charge_role_id = fields.Many2one('soong.user.role', string='角色')
+ in_charge_role_id = fields.Many2one('soong.user.role', string='角色', domain=[('user_type', '!=', 'lv_role')])
employee_ids = fields.Many2many('hr.employee', string='人员', compute='_compute_employee_ids', store=True)
weight = fields.Float(string="权重" )
diff --git a/yuthon_performance/models/yuthon_index_employee.py b/yuthon_performance/models/yuthon_index_employee.py
index bcae593fa..d780d74a9 100644
--- a/yuthon_performance/models/yuthon_index_employee.py
+++ b/yuthon_performance/models/yuthon_index_employee.py
@@ -11,7 +11,7 @@ class YuthonIndexEmployee(models.Model):
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='角色')
+ in_charge_role_id = fields.Many2one('soong.user.role', string='角色', domain=[('user_type', '!=', 'lv_role')])
employee_ids = fields.Many2many('hr.employee', string='人员范围')
department_ids = fields.Many2many('hr.department', string='部门')
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
diff --git a/yuthon_performance/models/yuthon_personal_logs.py b/yuthon_performance/models/yuthon_personal_logs.py
new file mode 100644
index 000000000..45ca2ec8b
--- /dev/null
+++ b/yuthon_performance/models/yuthon_personal_logs.py
@@ -0,0 +1,11 @@
+from odoo import models, fields, api, exceptions, _
+
+
+class YuthonPersonalLogs(models.Model):
+ _name = 'yuthon.personal.logs'
+ _description = '个人日志表'
+
+ name = fields.Char(string='标题', required=True)
+ matters = fields.Text(string='事项')
+ time = fields.Datetime(string='时间')
+ comprehensive_exchange = fields.Text(string='当月总汇')
\ No newline at end of file
diff --git a/yuthon_performance/models/yuthon_plan_management.py b/yuthon_performance/models/yuthon_plan_management.py
index db042c2fc..dd42b0743 100644
--- a/yuthon_performance/models/yuthon_plan_management.py
+++ b/yuthon_performance/models/yuthon_plan_management.py
@@ -1,16 +1,17 @@
from odoo import models, fields, api, exceptions, _
import datetime
+
class YuthonPlanManagement(models.Model):
_name = 'yuthon.plan.management'
_description = "个人工作任务"
_rec_name = 'name'
name = fields.Char('标题')
- select_time = fields.Selection([('January','一月'), ('February','二月'), ('March','三月'), ('April','四月'),
- ('May','五月'), ('June','六月'), ('July','七月'), ('August','八月'),
- ('September','九月'), ('October','十月'), ('November','十一月'), ('December','十二月')
- ,('half','上半年'), ('later','下半年')],string='选择时间')
+ select_time = fields.Selection([('January', '一月'), ('February', '二月'), ('March', '三月'), ('April', '四月'),
+ ('May', '五月'), ('June', '六月'), ('July', '七月'), ('July', '八月'),
+ ('September', '九月'), ('October', '十月'), ('November', '十一月'), ('December', '十二月')
+ ,('half', '上半年'), ('later', '下半年'), ('year', '年度')], string='选择时间', default=lambda self: self._get_default_month())
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
('thlc', '天河粮储')], string="所属公司")
work_tasks_line_ids = fields.One2many('yuthon.work.tasks.line','plan_id',string='工作任务明细')
@@ -27,16 +28,34 @@ class YuthonPlanManagement(models.Model):
}))
self.plan_management_ids = index_list
+ @api.model
+ def _get_default_month(self):
+ current_month = datetime.datetime.now().strftime("%B") # 获取当前月份的英文名称
+ month_mapping_cn = {
+ "一月": "January",
+ "二月": "February",
+ "三月": "March",
+ "四月": "April",
+ "五月": "May",
+ "六月": "June",
+ "七月": "July",
+ "八月": "August",
+ "九月": "September",
+ "十月": "October",
+ "十一月": "November",
+ "十二月": "December",
+ }
+ return month_mapping_cn.get(current_month)
+
class YuthonWorkTasksLine(models.Model):
_name = 'yuthon.work.tasks.line'
_description = "工作任务明细"
plan_id = fields.Many2one('yuthon.plan.management','关联个人工作任务')
select_time = fields.Selection(related='plan_id.select_time',string='选择时间')
- task_type = fields.Selection([('kpi', 'KPI'),
- ('gs', 'GS'), ('no', '否决指标')],string='任务类型')
- task_name = fields.Many2one('yuthon.index.management',string='任务名称')
- plan = fields.Char('计划安排及具体措施行动')
+ task_type = fields.Selection(related='task_id.index_type',string='任务类型')
+ task_id = fields.Many2one('yuthon.index.management',string='任务名称')
+ plan = fields.Char(related='task_id.compute_act',string='计划安排及具体措施行动')
goal = fields.Text('目标',help="质量、数量、成本等方面要求")
resource_requirements = fields.Text('资源需求')
summarize = fields.Text('完成情况总结')
@@ -47,7 +66,9 @@ class YuthonPlanManagementLine(models.Model):
_description = "个人工作任务明细"
plan_id = fields.Many2one('yuthon.plan.management', '关联个人工作任务')
- task_type = fields.Selection([('kpi', 'KPI'),
+ select_time = fields.Selection(related='plan_id.select_time', string='选择时间')
+ sequence = fields.Integer('序号')
+ tasks_type = fields.Selection([('kpi', 'KPI'),
('gs', 'GS'), ('no', '否决指标')], string='任务类型')
goal = fields.Text('目标', help="质量、数量、成本等方面要求")
diff --git a/yuthon_performance/security/ir.model.access.csv b/yuthon_performance/security/ir.model.access.csv
index 81b2709f8..fcf4f1978 100644
--- a/yuthon_performance/security/ir.model.access.csv
+++ b/yuthon_performance/security/ir.model.access.csv
@@ -25,4 +25,6 @@ access_new_employee_library_line,new_employee_library_line,model_new_employee_li
access_new_kpi_duty_approval,new_kpi_duty_approval,model_new_kpi_duty_approval,base.group_user,1,1,1,1
access_new_gs_duty_approval,new_gs_duty_approval,model_new_gs_duty_approval,base.group_user,1,1,1,1
access_yuthon_work_tasks_line,yuthon_work_tasks_line,model_yuthon_work_tasks_line,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
\ No newline at end of file
+access_yuthon_plan_management_line,yuthon_plan_management_line,model_yuthon_plan_management_line,base.group_user,1,1,1,1
+access_yuthon_personal_logs,yuthon_personal_logs,model_yuthon_personal_logs,base.group_user,1,1,1,1
+access_yuthon_departmental_responsible,yuthon_departmental_responsible,model_yuthon_departmental_responsible,base.group_user,1,1,1,1
diff --git a/yuthon_performance/security/yuthon_performance_security.xml b/yuthon_performance/security/yuthon_performance_security.xml
new file mode 100644
index 000000000..16e3a6727
--- /dev/null
+++ b/yuthon_performance/security/yuthon_performance_security.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yuthon_performance/views/yuthon_Index_management.xml b/yuthon_performance/views/yuthon_Index_management.xml
index f637d79bc..7669e8cb6 100644
--- a/yuthon_performance/views/yuthon_Index_management.xml
+++ b/yuthon_performance/views/yuthon_Index_management.xml
@@ -43,14 +43,13 @@
+
-
-
-
+
@@ -59,11 +58,12 @@
-
-
+
+
+
diff --git a/yuthon_performance/views/yuthon_departmental_responsible_views.xml b/yuthon_performance/views/yuthon_departmental_responsible_views.xml
new file mode 100644
index 000000000..aa462d408
--- /dev/null
+++ b/yuthon_performance/views/yuthon_departmental_responsible_views.xml
@@ -0,0 +1,30 @@
+
+
+
+ yuthon.departmental.responsible.tree
+ yuthon.departmental.responsible
+
+
+
+
+
+
+
+ yuthon.departmental.responsible.form
+ yuthon.departmental.responsible
+
+
+
+
+
+ 本部门责任书
+ yuthon.departmental.responsible
+ tree,form
+
+
\ 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 c718dd19d..20f499a62 100644
--- a/yuthon_performance/views/yuthon_duty_management.xml
+++ b/yuthon_performance/views/yuthon_duty_management.xml
@@ -14,7 +14,6 @@
-
yuthon.duty.management.form
yuthon.duty.management
@@ -31,17 +30,16 @@
-
-
+
-
+
+
-
-
+
@@ -54,9 +52,9 @@
-
-
-
+
+
+
@@ -70,18 +68,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yuthon_performance/views/yuthon_personal_logs_views.xml b/yuthon_performance/views/yuthon_personal_logs_views.xml
new file mode 100644
index 000000000..0d2e9f2ba
--- /dev/null
+++ b/yuthon_performance/views/yuthon_personal_logs_views.xml
@@ -0,0 +1,36 @@
+
+
+
+ yuthon.personal.logs.tree
+ yuthon.personal.logs
+
+
+
+
+
+
+
+
+
+
+ yuthon.personal.logs.form
+ yuthon.personal.logs
+
+
+
+
+
+ 个人日志表
+ yuthon.personal.logs
+ tree,form
+
+
diff --git a/yuthon_performance/views/yuthon_plan_management.xml b/yuthon_performance/views/yuthon_plan_management.xml
index 8da546187..342c93e53 100644
--- a/yuthon_performance/views/yuthon_plan_management.xml
+++ b/yuthon_performance/views/yuthon_plan_management.xml
@@ -35,8 +35,9 @@
+
+
-
@@ -48,8 +49,8 @@
+
-
@@ -61,8 +62,8 @@
+
-
@@ -74,8 +75,8 @@
+
-
@@ -87,8 +88,8 @@
+
-
@@ -100,8 +101,8 @@
+
-
@@ -113,8 +114,8 @@
+
-
@@ -126,8 +127,8 @@
+
-
@@ -139,8 +140,8 @@
+
-
@@ -152,8 +153,8 @@
+
-
@@ -165,8 +166,8 @@
+
-
@@ -178,8 +179,8 @@
+
-
@@ -191,8 +192,8 @@
+
-
@@ -204,8 +205,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -214,11 +228,152 @@
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yuthon_work_brand/views/performance_menu.xml b/yuthon_work_brand/views/performance_menu.xml
index 135350013..c75cffb83 100644
--- a/yuthon_work_brand/views/performance_menu.xml
+++ b/yuthon_work_brand/views/performance_menu.xml
@@ -62,10 +62,20 @@
name="个人工作任务"
sequence="5"
action="yuthon_performance.yuthon_plan_management_action1"/>
+
+
+ sequence="15"/>
+
+
+ sequence="15"/>
+
+
+ sequence="15"/>