From 69b2da20a8957c59b826ad6ae4ff56ef643b5c8a Mon Sep 17 00:00:00 2001
From: zhouzhou <123@qq.com>
Date: Fri, 25 Oct 2024 18:58:13 +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
---
.../data/attendance_code_data.xml | 2 +-
yuthon_issue/models/issue_library.py | 18 +-
yuthon_issue/security/ir.model.access.csv | 1 -
yuthon_issue/views/issue_library_views.xml | 1323 +++++++++++++++--
yuthon_performance/__manifest__.py | 2 +-
.../data/library_changes_data.xml | 14 +
yuthon_performance/models/__init__.py | 4 +-
.../models/yuthon_Index_management.py | 1 -
.../models/yuthon_duty_approval.py | 19 -
.../models/yuthon_duty_management.py | 31 +-
.../models/yuthon_employee_appraisal.py | 4 +-
.../models/yuthon_tissue_duty_approval.py | 93 ++
.../security/ir.model.access.csv | 6 +-
.../views/yuthon_Index_approval.xml | 38 +-
.../views/yuthon_duty_approval.xml | 91 --
.../views/yuthon_duty_management.xml | 1 +
.../views/yuthon_employee_approval.xml | 25 +-
.../views/yuthon_performance_menus.xml | 33 -
.../views/yuthon_tissue_duty_approval.xml | 114 ++
yuthon_property/__manifest__.py | 2 +
.../data/yuthon_property_approval_data.xml | 11 +
yuthon_property/models/__init__.py | 1 +
.../models/property_evaluate_application.py | 19 +
.../models/property_rental_form.py | 22 +
yuthon_property/models/yuthon_property.py | 2 +-
.../models/yuthon_property_evaluation.py | 4 +
.../models/yuthon_resource_mgmt_config.py | 13 -
yuthon_property/security/ir.model.access.csv | 21 +-
yuthon_property/views/menuitem.xml | 10 +-
.../property_evaluate_application_views.xml | 71 +
.../views/property_rental_form_views.xml | 72 +
.../yuthon_property_evaluation_views.xml | 2 +-
.../views/yuthon_property_views.xml | 28 +-
.../yuthon_resource_mgmt_config_views.xml | 19 -
yuthon_work_brand/views/hr_menus.xml | 5 +
35 files changed, 1771 insertions(+), 351 deletions(-)
delete mode 100644 yuthon_performance/models/yuthon_duty_approval.py
create mode 100644 yuthon_performance/models/yuthon_tissue_duty_approval.py
delete mode 100644 yuthon_performance/views/yuthon_duty_approval.xml
create mode 100644 yuthon_performance/views/yuthon_tissue_duty_approval.xml
create mode 100644 yuthon_property/data/yuthon_property_approval_data.xml
create mode 100644 yuthon_property/models/property_evaluate_application.py
create mode 100644 yuthon_property/models/property_rental_form.py
create mode 100644 yuthon_property/views/property_evaluate_application_views.xml
create mode 100644 yuthon_property/views/property_rental_form_views.xml
diff --git a/yuthon_hr_attendance/data/attendance_code_data.xml b/yuthon_hr_attendance/data/attendance_code_data.xml
index 5fb0bf200..3bdd7c20a 100644
--- a/yuthon_hr_attendance/data/attendance_code_data.xml
+++ b/yuthon_hr_attendance/data/attendance_code_data.xml
@@ -1,4 +1,4 @@
-
+
加班申请序列号
diff --git a/yuthon_issue/models/issue_library.py b/yuthon_issue/models/issue_library.py
index e3ab2a6af..9dcf65458 100644
--- a/yuthon_issue/models/issue_library.py
+++ b/yuthon_issue/models/issue_library.py
@@ -10,6 +10,7 @@ class IssueLibrary(models.Model):
_rec_name = 'name'
name = fields.Char(string='议题事项')
+ name_text = fields.Text(string='议题事项')
code = fields.Char(string='编号', required=True, copy=False,
default=lambda self: self.env['ir.sequence'].next_by_code('issue_library_code'))
state = fields.Selection([('draft', '待提交'), ('approval', '审批中'), ('on_approval', '已审批'),
@@ -28,7 +29,9 @@ class IssueLibrary(models.Model):
issue_library_approval_line_ids = fields.One2many('issue.library.approval.line', 'issue_library_id', string='流程记录')
approval_decision_sequence = fields.Char(string="决策清单事项")
is_booking = fields.Boolean(string="是否上会")
-
+ cs_party = fields.Char(string='党支委')
+ cs_class = fields.Char(string='班子会')
+ cs_boss = fields.Char(string='董事会')
issue_library_room_line_ids = fields.One2many('issue.library.room.line', 'issue_library_id', string="关联会议明细行")
# 权限相关隐藏字段
employee_id = fields.Many2one('hr.employee', string='创建人', default=lambda self: self.env.user.employee_id)
@@ -145,7 +148,20 @@ class IssueLibrary(models.Model):
raise UserError('议题已上会,不能删除')
return super().unlink()
+ @api.onchange('name')
+ def _onchange_name(self):
+ self.name_text = self.name
+
+ @api.onchange('issue_library_room_line_ids')
+ def _onchange_issue_library_room_line_ids(self):
+ for record in self.issue_library_room_line_ids:
+ if record.meeting_type_id.name == '党委会':
+ self.cs_party = record.room_booking_id.name
+ elif record.meeting_type_id.name == '班子会':
+ self.cs_class = record.room_booking_id.name
+ elif record.meeting_type_id.name == '董事会':
+ self.cs_boss = record.room_booking_id.name
class IssueLibraryLine(models.Model):
_name = "issue.library.line"
_description = '决策清单'
diff --git a/yuthon_issue/security/ir.model.access.csv b/yuthon_issue/security/ir.model.access.csv
index 1fb92bec8..dbdb7cd23 100644
--- a/yuthon_issue/security/ir.model.access.csv
+++ b/yuthon_issue/security/ir.model.access.csv
@@ -10,4 +10,3 @@ access_issue_meeting_minutes_line,issue_meeting_minutes_line,model_issue_meeting
access_issue_meeting_minutes,issue_meeting_minutes,model_issue_meeting_minutes,base.group_user,1,1,1,1
access_issue_meeting_line,issue_meeting_line,model_issue_meeting_line,base.group_user,1,1,1,1
access_issue_library_room_line,issue_library_room_line,model_issue_library_room_line,base.group_user,1,1,1,1
-
diff --git a/yuthon_issue/views/issue_library_views.xml b/yuthon_issue/views/issue_library_views.xml
index 60423eaa0..04c197f8a 100644
--- a/yuthon_issue/views/issue_library_views.xml
+++ b/yuthon_issue/views/issue_library_views.xml
@@ -1,6 +1,6 @@
-
+
issue.library.tree
issue.library
@@ -8,8 +8,9 @@
decoration-info="state == 'will'"
decoration-success="state == 'done'"
decoration-muted="state == 'cancel'">
-
+
+
@@ -36,6 +37,7 @@
+
@@ -63,6 +65,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issue.library.on.meeting.tree
+ issue.library
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issue.library.on.meeting.form
+ issue.library
+
+
@@ -154,6 +277,9 @@
issue.library
tree,form
[('state','=','on_meet')]
+
@@ -182,6 +308,8 @@
action = model.all_meeting_issue()
+
+
issue.library.tree
@@ -226,6 +354,9 @@
+
+
+
@@ -285,6 +416,121 @@
+
+
+ issue.library.on.meeting.tree
+ issue.library
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issue.library.tree
+ issue.library
+
+
+
+
议题库
@@ -313,8 +559,8 @@
tree,form
[('state','=','on_meet')]
+ (0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_tree3')}),
+ (0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_form3')})]"/>
@@ -327,6 +573,7 @@
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_form3')})]"/>
+
issue.library.tree
@@ -361,6 +608,7 @@
+
@@ -430,6 +678,121 @@
+
+
+ issue.library.on.meeting.tree
+ issue.library
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issue.library.tree
+ issue.library
+
+
+
+
议题库
@@ -458,8 +821,8 @@
tree,form
[('state','=','on_meet')]
+ (0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_tree4')}),
+ (0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_form4')})]"/>
@@ -471,6 +834,7 @@
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_tree4')}),
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_form4')})]"/>
+
issue.library.tree
@@ -585,7 +949,121 @@
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_tree5')}),
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_form5')})]"/>
+
+
+ issue.library.on.meeting.tree
+ issue.library
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issue.library.tree
+ issue.library
+
+
+
+
待上会
@@ -603,8 +1081,8 @@
tree,form
[('state','=','on_meet')]
+ (0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_tree5')}),
+ (0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_form5')})]"/>
@@ -719,6 +1197,121 @@
+
+
+ issue.library.on.meeting.tree
+ issue.library
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issue.library.tree
+ issue.library
+
+
+
+
议题库
@@ -731,7 +1324,6 @@
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_form6')})]"/>
-
待上会
issue.library
@@ -748,8 +1340,8 @@
tree,form
[('state','=','on_meet')]
+ (0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_tree6')}),
+ (0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_form6')})]"/>
@@ -864,6 +1456,121 @@
+
+
+ issue.library.on.meeting.tree
+ issue.library
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issue.library.tree
+ issue.library
+
+
+
+
议题库
@@ -876,7 +1583,6 @@
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_form7')})]"/>
-
待上会
issue.library
@@ -893,8 +1599,8 @@
tree,form
[('state','=','on_meet')]
+ (0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_tree7')}),
+ (0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_form7')})]"/>
@@ -1020,7 +1726,121 @@
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_tree9')}),
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_form9')})]"/>
+
+
+ issue.library.on.meeting.tree
+ issue.library
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issue.library.tree
+ issue.library
+
+
+
+
待上会
@@ -1038,8 +1858,8 @@
tree,form
[('state','=','on_meet')]
+ (0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_tree9')}),
+ (0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_form9')})]"/>
@@ -1165,6 +1985,121 @@
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_tree10')}),
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_form10')})]"/>
+
+
+ issue.library.on.meeting.tree
+ issue.library
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issue.library.tree
+ issue.library
+
+
+
+
待上会
@@ -1182,8 +2117,8 @@
tree,form
[('state','=','on_meet')]
+ (0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_tree10')}),
+ (0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_form10')})]"/>
@@ -1210,7 +2145,6 @@
-
@@ -1246,6 +2180,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issue.library.on.meeting.tree
+ issue.library
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issue.library.tree
+ issue.library
+
+
+
+
+
+
+ 议题库
+ issue.library
+ tree,form
+
+
+
+
+
+ 已审批
+ issue.library
+ tree,form
+ [('state','=','approval')]
+
+
+
+
+ 待上会
+ issue.library
+ tree,form
+ [('state','=','will')]
+
+
+
+
+ 已上会
+ issue.library
+ tree,form
+ [('state','=','on_meet')]
+
+
+
+
+ 已取消
+ issue.library
+ tree,form
+ [('state','=','cancel')]
+
+
+
+
+ issue.library.tree
+ issue.library
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issue.library.tree
+ issue.library
+
+
-
-
-
- 议题库
- issue.library
- tree,form
-
-
-
-
-
- 已审批
- issue.library
- tree,form
- [('state','=','approval')]
-
-
-
-
- 待上会
- issue.library
- tree,form
- [('state','=','will')]
-
-
-
-
- 已上会
- issue.library
- tree,form
- [('state','=','on_meet')]
-
-
-
-
- 已取消
- issue.library
- tree,form
- [('state','=','cancel')]
-
-
-
-
- issue.library.tree
+
+
+ issue.library.on.meeting.tree
issue.library
-
-
-
-
-
+
+
+
+
-
+
+
-
+
issue.library.tree
issue.library
@@ -1397,8 +2551,9 @@
-
+
+
@@ -1460,7 +2615,7 @@
-
+
@@ -1512,8 +2667,8 @@
tree,form
[('state','=','on_meet')]
+ (0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_tree12')}),
+ (0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_on_meeting_form12')})]"/>
diff --git a/yuthon_performance/__manifest__.py b/yuthon_performance/__manifest__.py
index 023db8ccd..2f064b4ed 100644
--- a/yuthon_performance/__manifest__.py
+++ b/yuthon_performance/__manifest__.py
@@ -19,7 +19,7 @@
'views/yuthon_performance_menus.xml',
'views/yuthon_plan_management.xml',
'views/yuthon_Index_approval.xml',
- 'views/yuthon_duty_approval.xml',
+ 'views/yuthon_tissue_duty_approval.xml',
'views/yuthon_index_employee.xml',
'views/yuthon_employee_approval.xml',
'views/yuthon_plan_approval.xml',
diff --git a/yuthon_performance/data/library_changes_data.xml b/yuthon_performance/data/library_changes_data.xml
index 9ba277cda..f343032cd 100644
--- a/yuthon_performance/data/library_changes_data.xml
+++ b/yuthon_performance/data/library_changes_data.xml
@@ -13,4 +13,18 @@
GR%(y)s%(month)s%(day)s
3
+
+
+ 组织绩效变更-编号
+ duty_approval_code
+ ZJ%(y)s%(month)s%(day)s
+ 3
+
+
+
+ 员工绩效变更-编号
+ employee_duty_approval_code
+ YJ%(y)s%(month)s%(day)s
+ 3
+
\ No newline at end of file
diff --git a/yuthon_performance/models/__init__.py b/yuthon_performance/models/__init__.py
index de89c3374..9525a551b 100644
--- a/yuthon_performance/models/__init__.py
+++ b/yuthon_performance/models/__init__.py
@@ -4,11 +4,11 @@ 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_tissue_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
-from . import yuthon_employee_appraisal
\ No newline at end of file
+from . import yuthon_employee_appraisal
diff --git a/yuthon_performance/models/yuthon_Index_management.py b/yuthon_performance/models/yuthon_Index_management.py
index bc911ba94..a46059600 100644
--- a/yuthon_performance/models/yuthon_Index_management.py
+++ b/yuthon_performance/models/yuthon_Index_management.py
@@ -63,7 +63,6 @@ class YuthonIndexManagement(models.Model):
index_applicant_kpi.append((0, 0,{
'duty_index_name':record.id,
}))
-
else:
index_applicant_gs.append((0, 0,{
'work_task':record.development_goals,
diff --git a/yuthon_performance/models/yuthon_duty_approval.py b/yuthon_performance/models/yuthon_duty_approval.py
deleted file mode 100644
index 4c8af333d..000000000
--- a/yuthon_performance/models/yuthon_duty_approval.py
+++ /dev/null
@@ -1,19 +0,0 @@
-from odoo import models, fields, api, exceptions, _
-
-
-class YuthonDutyApproval(models.Model):
- _name = 'yuthon.duty.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_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 dac3facad..d2236e0c4 100644
--- a/yuthon_performance/models/yuthon_duty_management.py
+++ b/yuthon_performance/models/yuthon_duty_management.py
@@ -18,6 +18,7 @@ class YuthonDutyManagement(models.Model):
users_role_ids = fields.Many2many('soong.user.role', string='被考核角色')
users_ids = fields.Many2many('hr.employee', 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")
@@ -67,25 +68,25 @@ class YuthonDutyManagement(models.Model):
})
return result
- @api.depends('users_role_ids')
- def _compute_users_role_ids(self):
- if self.users_role_ids:
- for user_id in self.users_role_ids:
- user_role_data = self.env['hr.employee'].search(
- ['|', ('user_role_id', '=', user_id.id.origin), ('user_role_ids', '=', user_id.id.origin)])
- users_role_list = [ro.user_id.id for ro in user_role_data]
- self.users_ids = [(6, 0, users_role_list)]
+ def button_tissue_approval(self):
+ form_id = self.env.ref('yuthon_performance.yuthon_tissue_duty_approval_form').id
+ return {
+ 'name': '组织绩效变更',
+ 'type': 'ir.actions.act_window',
+ 'res_model': 'yuthon.tissue.duty.approval',
+ 'views': [(form_id, 'form')],
+ 'context': {'default_change_duty_kpi_ids':self.performance_kpi_ids.ids,
+ 'default_change_duty_gs_ids':self.performance_gs_ids.ids,
+ }}
+
class YuthonKpiLine(models.Model):
_name = 'yuthon.kpi.line'
_description = "KPI明细行"
- _rec_name = ''
- # 链接部门责任书和变更菜单
+
+
performance_kpi_id = fields.Many2one('yuthon.duty.management', string="KPI")
- change_duty_kpi_id = fields.Many2one('yuthon.duty.approval', string="KPI变更明细")
-#
- # KPI
- # 指标名称
+ change_duty_kpi_id = fields.Many2one('yuthon.tissue.duty.approval', string="KPI变更明细")
duty_index_name = fields.Many2one('yuthon.index.management',string='指标名称', store=True)#
duty_index_definition = fields.Text(related='duty_index_name.index_definition', string="指标定义")
@@ -114,7 +115,7 @@ class YuthonGsLine(models.Model):
#
# # 链接部门责任书和变更菜单
performance_gs_id = fields.Many2one('yuthon.duty.management', string="GS")
- change_duty_gs_id = fields.Many2one('yuthon.duty.approval', string="GS变更明细")
+ change_duty_gs_id = fields.Many2one('yuthon.tissue.duty.approval', string="GS变更明细")
index_name_id = fields.Many2one('yuthon.index.management')
work_task = fields.Char(related='index_name_id.index_name', string="工作任务")
diff --git a/yuthon_performance/models/yuthon_employee_appraisal.py b/yuthon_performance/models/yuthon_employee_appraisal.py
index a126f2e67..c49acd682 100644
--- a/yuthon_performance/models/yuthon_employee_appraisal.py
+++ b/yuthon_performance/models/yuthon_employee_appraisal.py
@@ -22,8 +22,10 @@ class YuthonAppraisalLineDetail(models.Model):
_name = 'yuthon.appraisal.line.detail'
_description = '员工绩效考核明细行'
- appraisal_id = fields.Many2one('yuthon.employee.appraisal', string='关联员工绩效')
+ appraisal_id = fields.Many2one('yuthon.employee.appraisal', string='关联绩效考核表(员工)')
evaluation_id = fields.Many2one('yuthon.employee.performance', string='关联考核任务(员工)')
+ yuthon_employee_duty_approval_id = fields.Many2one('yuthon.employee.duty.approval',string='关联原员工绩效变更')
+
evaluation_dimensions = fields.Char(string='评价维度')
illustrate = fields.Char(string='说明')
grade = fields.Float(string='评分')
diff --git a/yuthon_performance/models/yuthon_tissue_duty_approval.py b/yuthon_performance/models/yuthon_tissue_duty_approval.py
new file mode 100644
index 000000000..01d0b8445
--- /dev/null
+++ b/yuthon_performance/models/yuthon_tissue_duty_approval.py
@@ -0,0 +1,93 @@
+from odoo import models, fields, api, exceptions, _
+
+
+class YuthonTissueDutyApproval(models.Model):
+ _name = 'yuthon.tissue.duty.approval'
+ _description = "组织绩效变更申请表"
+ _inherit = ['soong.workflow.mixin']
+ _rec_name = 'name'
+
+ name = fields.Char('标题')
+ creation_time = fields.Datetime(string='申请日期', default=lambda self: fields.Datetime.now())
+ code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('duty_approval_code'))
+ job_id = fields.Many2one('hr.job', string="岗位")
+ 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明细")
+ new_kpi_duty_approval_ids = fields.One2many('new.kpi.duty.approval', 'yuthon_tissue_duty_approval_id', string="关联新组织绩效KPI变更明细")
+ new_gs_duty_approval_ids = fields.One2many('new.gs.duty.approval', 'yuthon_tissue_duty_approval_id', string="关联新组织绩效GS变更明细")
+ is_kpi = fields.Boolean('是否KPI')
+ is_gs = fields.Boolean('是否GS')
+
+ @api.onchange('change_duty_kpi_ids')
+ def onchange_change_index_library_ids(self):
+ new_lines = []
+ for old in self:
+ for new in old.change_duty_kpi_ids:
+ new_lines.append((0, 0, {
+ 'new_duty_index_name': new.duty_index_name.index_name,
+ 'new_duty_index_definition': new.duty_index_definition,
+ 'new_weight': new.weight,
+ 'new_unit_compute':new.unit_compute
+ }))
+ self.new_kpi_duty_approval_ids = new_lines
+
+ @api.onchange('change_duty_gs_ids')
+ def onchange_change_index_gs_library_ids(self):
+ new_lines = []
+ for old in self:
+ for new in old.change_duty_gs_ids:
+ new_lines.append((0, 0, {
+ 'new_work_task': new.work_task,
+ 'new_compute_act': new.compute_act,
+ 'new_node_target': new.node_target,
+ 'new_quality_objectives': new.quality_objectives,
+ 'new_node_target1': new.node_target1,
+ 'new_quality_objectives1':new.quality_objectives1,
+ 'new_node_target2': new.node_target2,
+ 'new_quality_objectives2': new.quality_objectives2,
+ 'new_weight': new.weight
+ }))
+ self.new_gs_duty_approval_ids = new_lines
+
+ @api.model_create_multi
+ def create(self, vals_list):
+ res = super().create(vals_list)
+ for vals in vals_list:
+ if vals['new_kpi_duty_approval_ids']:
+ for line in vals['new_kpi_duty_approval_ids']:
+ self.env['yuthon.kpi.line'].create({
+ 'performance_kpi_id':res.id,
+ 'duty_index_name':line.new_duty_index_name
+ })
+ return res
+
+
+class NewKpiDutyApproval(models.Model):
+ _name = 'new.kpi.duty.approval'
+ _description = "新组织绩效KPI变更申请表"
+
+ yuthon_tissue_duty_approval_id = fields.Many2one('yuthon.tissue.duty.approval', string="关联组织绩效变更申请表")
+ new_duty_index_name = fields.Char(string='指标名称', store=True) #
+ new_duty_index_definition = fields.Text(string="指标定义")
+ new_weight = fields.Float(string="权重")
+ new_unit_compute = fields.Char(string="单位计算")
+
+
+
+class NewGsDutyApproval(models.Model):
+ _name = 'new.gs.duty.approval'
+ _description = "新组织绩效GS变更申请表"
+
+ yuthon_tissue_duty_approval_id = fields.Many2one('yuthon.tissue.duty.approval', string="关联组织绩效变更申请表")
+ new_work_task = fields.Char(string="工作任务")
+ new_compute_act = fields.Char(string="计划安排及具体措施/行动")
+ new_node_target = fields.Char(string="节点目标")
+ new_quality_objectives = fields.Char(string="质量目标")
+ new_node_target1 = fields.Char(string="节点目标")
+ new_quality_objectives1 = fields.Char(string="质量目标")
+ new_node_target2 = fields.Char(string="节点目标")
+ new_quality_objectives2 = fields.Char(string="质量目标")
+ new_weight = fields.Char(string="权重%")
diff --git a/yuthon_performance/security/ir.model.access.csv b/yuthon_performance/security/ir.model.access.csv
index 897ed19d6..d602c24f2 100644
--- a/yuthon_performance/security/ir.model.access.csv
+++ b/yuthon_performance/security/ir.model.access.csv
@@ -6,7 +6,7 @@ access_yuthon_plan_management_line,yuthon_plan_management_line,model_yuthon_plan
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_tissue_duty_approval,yuthon_tissue_duty_approval,model_yuthon_tissue_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
@@ -23,4 +23,6 @@ access_yuthon_assessment_tasks_lines,yuthon_assessment_tasks_lines,model_yuthon_
access_yuthon_assessment_tasks_wizard,yuthon_assessment_tasks_wizard,model_yuthon_assessment_tasks_wizard,base.group_user,1,1,1,1
access_yuthon_index_employee_line,yuthon_index_employee_line,model_yuthon_index_employee_line,base.group_user,1,1,1,1
access_new_index_management_line,new_index_management_line,model_new_index_management_line,base.group_user,1,1,1,1
-access_new_employee_library_line,new_employee_library_line,model_new_employee_library_line,base.group_user,1,1,1,1
\ No newline at end of file
+access_new_employee_library_line,new_employee_library_line,model_new_employee_library_line,base.group_user,1,1,1,1
+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
\ No newline at end of file
diff --git a/yuthon_performance/views/yuthon_Index_approval.xml b/yuthon_performance/views/yuthon_Index_approval.xml
index 7703af33d..a38f48712 100644
--- a/yuthon_performance/views/yuthon_Index_approval.xml
+++ b/yuthon_performance/views/yuthon_Index_approval.xml
@@ -39,25 +39,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yuthon_performance/views/yuthon_duty_approval.xml b/yuthon_performance/views/yuthon_duty_approval.xml
deleted file mode 100644
index 200d67fbf..000000000
--- a/yuthon_performance/views/yuthon_duty_approval.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
- yuthon.duty.approval.tree
- yuthon.duty.approval
-
-
-
-
-
-
-
-
-
- yuthon.duty.approval.form
- yuthon.duty.approval
-
-
-
-
-
-
- yuthon.duty.approval.search
- yuthon.duty.approval
-
-
-
-
-
-
-
-
- 部门责任变更
- yuthon.duty.approval
- 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 f810f3d26..645ac28df 100644
--- a/yuthon_performance/views/yuthon_duty_management.xml
+++ b/yuthon_performance/views/yuthon_duty_management.xml
@@ -12,6 +12,7 @@
+
diff --git a/yuthon_performance/views/yuthon_employee_approval.xml b/yuthon_performance/views/yuthon_employee_approval.xml
index 96f4da672..7687d8589 100644
--- a/yuthon_performance/views/yuthon_employee_approval.xml
+++ b/yuthon_performance/views/yuthon_employee_approval.xml
@@ -39,18 +39,19 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yuthon_performance/views/yuthon_performance_menus.xml b/yuthon_performance/views/yuthon_performance_menus.xml
index dd3b378b6..5af811fe4 100644
--- a/yuthon_performance/views/yuthon_performance_menus.xml
+++ b/yuthon_performance/views/yuthon_performance_menus.xml
@@ -33,39 +33,6 @@
name="员工绩效指标库"
sequence="3"
action="yuthon_index_management_action"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yuthon_performance/views/yuthon_tissue_duty_approval.xml b/yuthon_performance/views/yuthon_tissue_duty_approval.xml
new file mode 100644
index 000000000..bd1404b3b
--- /dev/null
+++ b/yuthon_performance/views/yuthon_tissue_duty_approval.xml
@@ -0,0 +1,114 @@
+
+
+
+
+ yuthon.tissue.duty.approval.tree
+ yuthon.tissue.duty.approval
+
+
+
+
+
+
+
+
+
+ yuthon.tissue.duty.approval.form
+ yuthon.tissue.duty.approval
+
+
+
+
+
+
+
+ 组织绩效变更申请表
+ yuthon.tissue.duty.approval
+ tree,form
+
+
+
\ No newline at end of file
diff --git a/yuthon_property/__manifest__.py b/yuthon_property/__manifest__.py
index 4eed42589..88d4a490a 100644
--- a/yuthon_property/__manifest__.py
+++ b/yuthon_property/__manifest__.py
@@ -10,6 +10,7 @@
'data': [
'security/ir.model.access.csv',
'data/data_yuthon_resource_mgmt_config.xml',
+ 'data/yuthon_property_approval_data.xml',
'views/yuthon_property_views.xml',
'views/property_type_views.xml',
'views/property_patrol_duty.xml',
@@ -20,6 +21,7 @@
'views/yuthon_draw_result_views.xml',
'views/yuthon_expert_database_views.xml',
'views/yuthon_resource_mgmt_config_views.xml',
+ 'views/property_evaluate_application_views.xml',
'views/yuthon_property_evaluation_views.xml',
'views/menuitem.xml',
],
diff --git a/yuthon_property/data/yuthon_property_approval_data.xml b/yuthon_property/data/yuthon_property_approval_data.xml
new file mode 100644
index 000000000..eb62db1de
--- /dev/null
+++ b/yuthon_property/data/yuthon_property_approval_data.xml
@@ -0,0 +1,11 @@
+
+
+
+ 评估申请编号
+ yuthon_property_code
+ PG%(y)s%(month)s%(day)s
+ 3
+
+
+
+
\ No newline at end of file
diff --git a/yuthon_property/models/__init__.py b/yuthon_property/models/__init__.py
index dcf016523..ba62b2c4a 100644
--- a/yuthon_property/models/__init__.py
+++ b/yuthon_property/models/__init__.py
@@ -9,3 +9,4 @@ from . import yuthon_resource_mgmt_config
from . import yuthon_draw_result
from . import yuthon_expert_database
from . import yuthon_property_evaluation
+from . import property_evaluate_application
\ No newline at end of file
diff --git a/yuthon_property/models/property_evaluate_application.py b/yuthon_property/models/property_evaluate_application.py
new file mode 100644
index 000000000..763b8dd5b
--- /dev/null
+++ b/yuthon_property/models/property_evaluate_application.py
@@ -0,0 +1,19 @@
+from odoo import models, fields, api
+
+
+class PropertyEvaluateApplication(models.Model):
+ _name = 'property.evaluate.application'
+ _description = '物业评估申请'
+ _inherit = 'mail.activity.mixin'
+
+
+ name = fields.Char(string='标题')
+ code = fields.Char(string='编号', required=True, copy=False,
+ default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_property_code_sequence'))
+ main_text = fields.Html(string='正文')
+ is_meet = fields.Boolean(string="是否上会")
+ is_experts = fields.Boolean(string="是否需要专家评审")
+ notice_documents_ids = fields.Many2many('ir.attachment', string='议题附件')
+ property_message_ids = fields.One2many('yuthon.property.evaluation', 'property_message_id', string='物业信息明细行')
+
+
diff --git a/yuthon_property/models/property_rental_form.py b/yuthon_property/models/property_rental_form.py
new file mode 100644
index 000000000..a63b1c417
--- /dev/null
+++ b/yuthon_property/models/property_rental_form.py
@@ -0,0 +1,22 @@
+from odoo import models, fields, api
+
+
+class PropertyRentalForm(models.Model):
+ _name = 'yuthon.property.rental.form'
+ _description = '出租申报表'
+
+ name = fields.Char(string='名称')
+ property_address = fields.Char(string='物业地址')
+ registered_use = fields.Char(string='证载用途')
+ evaluation_area = fields.Float(string='出租面积(m²)')
+ current_status = fields.Date(string='租聘到期日')
+ owner = fields.Char(string='原租户')
+ now_rent_price = fields.Float(string='现租价(元/m² •月)')
+ evaluate_rent_price = fields.Float(string='评估租(元/m² •月)')
+ upset_square = fields.Float(string='底价(元/m² •月)')
+ upset = fields.Float(string='底价(元/月)')
+ lease_period = fields.Char(string='租凭年限')
+ increment_rate = fields.Float(string='递增率')
+ rental_use = fields.Char(string='出租用途')
+ other = fields.Char(string='其他')
+ remarks = fields.Text(string='备注')
\ No newline at end of file
diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py
index 311b87077..a86dfd8d7 100644
--- a/yuthon_property/models/yuthon_property.py
+++ b/yuthon_property/models/yuthon_property.py
@@ -21,7 +21,7 @@ class YuthonProperty(models.Model):
('entrust', '委托'), ('Rent', '租入')], string='资产来源')
remark = fields.Char(string="备注")
vr_link = fields.Char(string="VR链接")
- other_materials = fields.Binary(string="其他材料", readonly=False)
+ notice_documents_ids = fields.Many2many('ir.attachment', string='议题附件')
abbreviation = fields.Char(string="简称")
property_floor = fields.Integer(string="楼层")
diff --git a/yuthon_property/models/yuthon_property_evaluation.py b/yuthon_property/models/yuthon_property_evaluation.py
index 868f03af1..aedb452b6 100644
--- a/yuthon_property/models/yuthon_property_evaluation.py
+++ b/yuthon_property/models/yuthon_property_evaluation.py
@@ -34,3 +34,7 @@ class YuthonPropertyEvaluation(models.Model):
evaluation_whole_rent_price = fields.Float(string='评估整租单价(元/m² •月)')
evaluation_whole_rent_total = fields.Float(string='评估总价(元•月,整租)')
+ assessment_category = fields.Char(string='评估类别')
+ property_message_id = fields.Many2one('property.evaluate.application', string='关联物业评估申请')
+
+
diff --git a/yuthon_property/models/yuthon_resource_mgmt_config.py b/yuthon_property/models/yuthon_resource_mgmt_config.py
index f3e551787..8995c7a26 100644
--- a/yuthon_property/models/yuthon_resource_mgmt_config.py
+++ b/yuthon_property/models/yuthon_resource_mgmt_config.py
@@ -2,19 +2,6 @@ from pkg_resources import require
from odoo import models, fields, api
-
-class YuthonResourceMgmtConfig(models.Model):
- _name = 'yuthon.resource.mgmt.config'
- _description = '资源管理配置'
- _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin']
-
- asset_type_id = fields.Many2one('yuthon.resource.type', string="资产类型", required=True)
- house_type_id = fields.Many2one('yuthon.resource.house.type', string="户型")
- purpose_id = fields.Many2one('yuthon.resource.purpose', string="用途")
- mgmt_type_id = fields.Many2one('yuthon.resource.management.type', string="管理类型")
- billing_type_id = fields.Many2one('yuthon.resource.billing.type', string="开票类型")
-
-
class YuthonResourceType(models.Model):
_name = 'yuthon.resource.type'
_description = '资产类型'
diff --git a/yuthon_property/security/ir.model.access.csv b/yuthon_property/security/ir.model.access.csv
index f1d5b151c..aca0079c3 100644
--- a/yuthon_property/security/ir.model.access.csv
+++ b/yuthon_property/security/ir.model.access.csv
@@ -6,16 +6,15 @@ access_property_patrol_plan,property_patrol_plan,model_property_patrol_plan,base
access_property_route_management,property_route_management,model_property_route_management,base.group_user,1,1,1,1
access_property_patrol_position,property_patrol_position,model_property_patrol_position,base.group_user,1,1,1,1
access_property_patrol_standard,property_patrol_standard,model_property_patrol_standard,base.group_user,1,1,1,1
-access_yuthon_draw_result,yuthon.draw.result,model_yuthon_draw_result,base.group_user,1,1,1,1
-access_yuthon_expert_database,yuthon.expert.database,model_yuthon_expert_database,base.group_user,1,1,1,1
-access_yuthon_property_water,yuthon.property.water,model_yuthon_property_water,base.group_user,1,1,1,1
-access_yuthon_property_energy,yuthon.property.energy,model_yuthon_property_energy,base.group_user,1,1,1,1
-access_yuthon_resource_mgmt_config,yuthon.resource.mgmt.config,model_yuthon_resource_mgmt_config,base.group_user,1,1,1,1
-access_yuthon_resource_type,yuthon.resource.type,model_yuthon_resource_type,base.group_user,1,1,1,1
-access_yuthon_resource_house_type,yuthon.resource.house.type,model_yuthon_resource_house_type,base.group_user,1,1,1,1
-access_yuthon_resource_purpose,yuthon.resource.purpose,model_yuthon_resource_purpose,base.group_user,1,1,1,1
-access_yuthon_resource_management_type,yuthon.resource.management.type,model_yuthon_resource_management_type,base.group_user,1,1,1,1
-access_yuthon_resource_billing_type,yuthon.resource.billing.type,model_yuthon_resource_billing_type,base.group_user,1,1,1,1
-access_yuthon_property_evaluation,yuthon.property.evaluation,model_yuthon_property_evaluation,base.group_user,1,1,1,1
+access_yuthon_draw_result,yuthon_draw_result,model_yuthon_draw_result,base.group_user,1,1,1,1
+access_yuthon_expert_database,yuthon_expert_database,model_yuthon_expert_database,base.group_user,1,1,1,1
+access_yuthon_property_water,yuthon_property_water,model_yuthon_property_water,base.group_user,1,1,1,1
+access_yuthon_property_energy,yuthon_property_energy,model_yuthon_property_energy,base.group_user,1,1,1,1
+access_yuthon_resource_type,yuthon_resource_type,model_yuthon_resource_type,base.group_user,1,1,1,1
+access_yuthon_resource_house_type,yuthon_resource_house_type,model_yuthon_resource_house_type,base.group_user,1,1,1,1
+access_yuthon_resource_purpose,yuthon_resource_purpose,model_yuthon_resource_purpose,base.group_user,1,1,1,1
+access_yuthon_resource_management_type,yuthon_resource_management_type,model_yuthon_resource_management_type,base.group_user,1,1,1,1
+access_yuthon_resource_billing_type,yuthon_resource_billing_type,model_yuthon_resource_billing_type,base.group_user,1,1,1,1
+access_property_evaluate_application,property_evaluate_application,model_property_evaluate_application,base.group_user,1,1,1,1
diff --git a/yuthon_property/views/menuitem.xml b/yuthon_property/views/menuitem.xml
index 0dbf6cdbe..6fcd0dc56 100644
--- a/yuthon_property/views/menuitem.xml
+++ b/yuthon_property/views/menuitem.xml
@@ -21,12 +21,12 @@
sequence="1"
name="待评估"
parent="yuthon_property_menu"
- action="property_assess_action"/>
+ action="yuthon_property_evaluation_action1"/>
+ action="property_evaluate_application_action"/>
+ sequence="2"/>
@@ -282,8 +282,8 @@
+ sequence="50"/>
diff --git a/yuthon_property/views/property_evaluate_application_views.xml b/yuthon_property/views/property_evaluate_application_views.xml
new file mode 100644
index 000000000..984ddc6eb
--- /dev/null
+++ b/yuthon_property/views/property_evaluate_application_views.xml
@@ -0,0 +1,71 @@
+
+
+
+ property.evaluate.application.tree
+ property.evaluate.application
+
+
+
+
+
+
+
+
+
+
+ property.evaluate.application.form
+ property.evaluate.application
+
+
+
+
+
+ 物业评估申请
+ property.evaluate.application
+ tree,form
+
+
+
diff --git a/yuthon_property/views/property_rental_form_views.xml b/yuthon_property/views/property_rental_form_views.xml
new file mode 100644
index 000000000..ccb5800ea
--- /dev/null
+++ b/yuthon_property/views/property_rental_form_views.xml
@@ -0,0 +1,72 @@
+
+
+
+ property.rental.form.tree
+ property.rental.form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ property.rental.form.form
+ property.rental.form
+
+
-
+rental_form
yuthon_property_evaluation_view_tree
diff --git a/yuthon_property/views/yuthon_property_views.xml b/yuthon_property/views/yuthon_property_views.xml
index c38c1d161..2351f122b 100644
--- a/yuthon_property/views/yuthon_property_views.xml
+++ b/yuthon_property/views/yuthon_property_views.xml
@@ -39,9 +39,6 @@
-
yuthon.property.water.tree
yuthon.property.water
diff --git a/yuthon_property/views/yuthon_resource_mgmt_config_views.xml b/yuthon_property/views/yuthon_resource_mgmt_config_views.xml
index b93907f34..f43f3a8bc 100644
--- a/yuthon_property/views/yuthon_resource_mgmt_config_views.xml
+++ b/yuthon_property/views/yuthon_resource_mgmt_config_views.xml
@@ -1,24 +1,5 @@
-
- yuthon.resource.mgmt.config.tree
- yuthon.resource.mgmt.config
-
-
-
-
-
-
-
-
-
-
-
-
- 资源管理配置
- yuthon.resource.mgmt.config
- tree
-
yuthon.resource.type.tree
diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml
index 9aecdb314..cfe49b89b 100644
--- a/yuthon_work_brand/views/hr_menus.xml
+++ b/yuthon_work_brand/views/hr_menus.xml
@@ -672,6 +672,11 @@
name="员工绩效"
sequence="5"
action="yuthon_performance.yuthon_employee_performance_action"/>
+