From d6b52c33a11e624e608315387bd0b08381a5cab0 Mon Sep 17 00:00:00 2001
From: zhou <123@>
Date: Thu, 23 Jan 2025 17:21:50 +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
---
.../models/soong_workflow_inspector.py | 20 ++-
soong_workflow/views/menuitem.xml | 28 ++--
.../views/soong_workflow_inspector_views.xml | 140 +++++++++---------
.../models/resource_calendar_leaves.py | 5 +
.../views/all_attendance_menu.xml | 5 +
.../views/hr_attendance_views.xml | 2 +-
.../views/resource_calendar_leaves_views.xml | 10 ++
yuthon_hr_employee/__manifest__.py | 1 +
.../models/yuthon_hr_employee.py | 17 ++-
.../views/inherit_hr_work_location_views.xml | 14 ++
.../views/yuthon_hr_employee_views.xml | 60 ++++----
.../models/yuthon_reassignment_approval.py | 9 +-
.../views/yuthon_interview_approval_views.xml | 22 ++-
.../yuthon_reassignment_approval_views.xml | 6 +-
.../models/property_report_repair.py | 13 +-
yuthon_maintain/views/all_menu.xml | 110 +++++++-------
.../views/maintenance_equipment_views.xml | 2 +-
.../views/property_report_repair.xml | 25 +---
.../inherit_soong_workflow_insector_views.xml | 18 +--
yuthon_work_brand/__manifest__.py | 2 +-
yuthon_work_brand/views/executive_manage.xml | 57 +++++++
yuthon_work_brand/views/hr_menus.xml | 10 --
22 files changed, 322 insertions(+), 254 deletions(-)
create mode 100644 yuthon_hr_employee/views/inherit_hr_work_location_views.xml
diff --git a/soong_workflow/models/soong_workflow_inspector.py b/soong_workflow/models/soong_workflow_inspector.py
index 147d3235b..d6a607b9d 100644
--- a/soong_workflow/models/soong_workflow_inspector.py
+++ b/soong_workflow/models/soong_workflow_inspector.py
@@ -9,18 +9,24 @@ class SoongWorkflowInspector(models.Model):
_name = "soong.workflow.inspector"
_description = "督查督办"
- name = fields.Char(string="督办主题")
- start_data = fields.Date(string="开始日期")
- end_data = fields.Date(string="结束日期")
+ name = fields.Char(string="标题")
+ start_data = fields.Date(string="督办日期")
+ end_data = fields.Date(string="完成日期")
+ reason = fields.Html(string="正文")
+ user_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user)
+ department_id = fields.Many2one(related='user_id.department_id', string="部门")
code = fields.Char(string="督办编号", default=lambda self: self.env['ir.sequence'].next_by_code('inspector_code'))
- department_id = fields.Many2one('hr.department', string="部门")
- inspector_importance = fields.Selection([('normal', '正常'), ('urgent', '紧急')], string="重要程度")
+ department_ids = fields.Many2many('hr.department', string="督办部门")
+ employee_ids = fields.Many2many('hr.employee', string="督办人员")
inspector_html = fields.Html(string="督办内容")
+ inspector_state = fields.Selection([('to_executed','待执行'),
+ ('executed','已执行'), ('finish', '已完成'), ('postponed', '延期')], string='督办状态', default='to_executed')
inspector_text = fields.Text(string="督办要求")
- document_id = fields.Binary(string="附件")
+ inspector_result = fields.Text(string="督办结果")
+ remarks = fields.Text(string='备注')
+ document_ids = fields.Many2many('ir.attachment', string="附件")
inspector_line_ids = fields.One2many('soong.workflow.inspector.line', 'workflow_inspector_id', string='任务进度')
inspector_line2_ids = fields.One2many('soong.workflow.inspector.line2', 'workflow_inspector_id', string='督办明细')
- attachment_ids = fields.Many2many('ir.attachment', string='Attachments')
relevancy_type = fields.Selection([('none', '无')], string="关联流程类型")
diff --git a/soong_workflow/views/menuitem.xml b/soong_workflow/views/menuitem.xml
index ba5872af4..b9517600c 100644
--- a/soong_workflow/views/menuitem.xml
+++ b/soong_workflow/views/menuitem.xml
@@ -48,22 +48,22 @@
action="soong_workflow_inspector_action"
parent="menu_soong_workflow_inspector"/>
-
+
+
+
+
-
+
+
+
+
+
-
+
+
+
+
+
-
-
soong.workflow.inspector.form
soong.workflow.inspector
@@ -22,60 +20,58 @@
@@ -88,27 +84,27 @@
-
- soong.workflow.inspector.line.tree
- soong.workflow.inspector.line
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- 督察事项
- soong.workflow.inspector.line
- tree
-
+
+
+
+
+
\ No newline at end of file
diff --git a/yuthon_hr_attendance/models/resource_calendar_leaves.py b/yuthon_hr_attendance/models/resource_calendar_leaves.py
index 5d9c809e6..d2632db15 100644
--- a/yuthon_hr_attendance/models/resource_calendar_leaves.py
+++ b/yuthon_hr_attendance/models/resource_calendar_leaves.py
@@ -114,3 +114,8 @@ class ResourceCalendarHolidaye(models.Model):
holiday_type = fields.Char(string="假期类型")
calendar_start_time = fields.Datetime(string="假期开始时间")
calendar_end_time = fields.Datetime(string="假期结束时间")
+
+class ResourceCalendarLeave(models.Model):
+ _inherit = "resource.calendar.leaves"
+
+ is_holidays = fields.Boolean(string="法定节假日")
\ No newline at end of file
diff --git a/yuthon_hr_attendance/views/all_attendance_menu.xml b/yuthon_hr_attendance/views/all_attendance_menu.xml
index 93d64a3c2..aee76fa21 100644
--- a/yuthon_hr_attendance/views/all_attendance_menu.xml
+++ b/yuthon_hr_attendance/views/all_attendance_menu.xml
@@ -83,6 +83,11 @@
parent="menu_hr_attendance_approval_request_board"
sequence="7"
action="approval_request_leave"/>
+
diff --git a/yuthon_hr_attendance/views/hr_attendance_views.xml b/yuthon_hr_attendance/views/hr_attendance_views.xml
index 1634557bc..b08e8683e 100644
--- a/yuthon_hr_attendance/views/hr_attendance_views.xml
+++ b/yuthon_hr_attendance/views/hr_attendance_views.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/yuthon_hr_attendance/views/resource_calendar_leaves_views.xml b/yuthon_hr_attendance/views/resource_calendar_leaves_views.xml
index 8d055677a..2e109c35b 100644
--- a/yuthon_hr_attendance/views/resource_calendar_leaves_views.xml
+++ b/yuthon_hr_attendance/views/resource_calendar_leaves_views.xml
@@ -66,4 +66,14 @@
+
+ resource.calendar.leaves.tree
+ resource.calendar.leaves
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yuthon_hr_employee/__manifest__.py b/yuthon_hr_employee/__manifest__.py
index cb55d5fef..65096802a 100644
--- a/yuthon_hr_employee/__manifest__.py
+++ b/yuthon_hr_employee/__manifest__.py
@@ -26,6 +26,7 @@
'views/applicant_tage_setting_views.xml',
'views/inherit_res_user_views.xml',
'views/hr_job_type_views.xml',
+ 'views/inherit_hr_work_location_views.xml',
'views/yuthon_party_setting_views.xml',
'views/inherit_hr_job_views.xml',
'wizard/hr_employee_wizard_views.xml',
diff --git a/yuthon_hr_employee/models/yuthon_hr_employee.py b/yuthon_hr_employee/models/yuthon_hr_employee.py
index 81de8bcee..0608130b1 100644
--- a/yuthon_hr_employee/models/yuthon_hr_employee.py
+++ b/yuthon_hr_employee/models/yuthon_hr_employee.py
@@ -51,6 +51,10 @@ class YuthonHrEmployee(models.Model):
string="员工状态")
user_number_start_time = fields.Date(string="身份证开始时间")
user_number_end_time = fields.Date(string="身份证到期时间")
+ is_identification = fields.Boolean(string="是否填写身份证")
+ card_documents_id = fields.Many2one('ir.attachment', string="身份证")
+ hukou_documents_id = fields.Many2one('ir.attachment', string="户口本")
+ marriage_documents_id = fields.Many2one('ir.attachment', string="结婚证")
nation = fields.Selection(nation_list, string="民族")
old = fields.Integer(string="年龄", compute='_compute_info')
birthday = fields.Date(string="出生年月", compute='_compute_info')
@@ -63,6 +67,7 @@ class YuthonHrEmployee(models.Model):
dang_data = fields.Date(string="入团(党)时间")
user_origin = fields.Char(string="籍贯")
user_location = fields.Char(string="户口所在地")
+ is_location = fields.Boolean(string="是否本地")
user_location_type = fields.Selection([('formal', '本地农业'), ('labor', '本地非农业'),
('part_time', '外地农业'), ('practice', '外地非农业')], string="户籍类型")
duty_replacement_card = fields.Integer(string="值班补卡次数(月)")
@@ -81,9 +86,6 @@ class YuthonHrEmployee(models.Model):
social_insurance_date = fields.Date(string="缴纳社保日期")
social_insurance_time = fields.Char(string="社保时长", compute='_compute_social_insurance_info', store=True)
-
-
-
# 教育
high_degree = fields.Char(string="最高学历")
high_degree2 = fields.Char(string="最高学位")
@@ -130,6 +132,13 @@ class YuthonHrEmployee(models.Model):
pinyin_min = fields.Char(string='拼音缩写', compute='_compute_pinyin', index=True, store=True)
+ @api.onchange('user_location')
+ def _onchange_user_location(self):
+ if self.user_location:
+ self.is_location = True
+ else:
+ self.is_location = False
+
@api.model_create_multi
def create(self, vals_list):
recs = super().create(vals_list)
@@ -291,6 +300,7 @@ class YuthonHrEmployee(models.Model):
def _compute_info(self):
for record in self:
if record.identification_id:
+ self.is_identification = True
id_number = record.identification_id.upper()
if len(id_number) != 18:
record._clear_info()
@@ -320,6 +330,7 @@ class YuthonHrEmployee(models.Model):
raise UserError(str(e) or "身份证号码格式不正确") # Raise UserError
else:
record._clear_info()
+ self.is_identification = False
def _clear_info(self):
self.birthday = False
diff --git a/yuthon_hr_employee/views/inherit_hr_work_location_views.xml b/yuthon_hr_employee/views/inherit_hr_work_location_views.xml
new file mode 100644
index 000000000..7c4430a53
--- /dev/null
+++ b/yuthon_hr_employee/views/inherit_hr_work_location_views.xml
@@ -0,0 +1,14 @@
+
+
+
+ hr.work.location.inherit.form
+ hr.work.location
+
+
+
+ 联系人
+
+
+
+
+
diff --git a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
index 8d51d6576..c28f1a551 100644
--- a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
+++ b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
@@ -19,18 +19,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -84,6 +72,8 @@
+
+
@@ -96,6 +86,7 @@
+
@@ -110,6 +101,10 @@
+
+
+
+
@@ -148,21 +143,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -192,10 +173,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
hr.employee.inherit.del.form
hr.employee
diff --git a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py
index b68aa98da..e960d0d96 100644
--- a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py
@@ -14,12 +14,11 @@ class YuthonReassignmentApproval(models.Model):
code = fields.Char(string="编号",
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_reassignment_approval_code'))
phone = fields.Char(related='users_id.employee_id.work_phone',string='联系电话')
- yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储')], string="任职单位")
+ yuthon_company = fields.Selection(related='employee_id.yuthon_company', string="任职单位")
job_id = fields.Many2one(related='users_id.employee_id.job_id', string="主岗")
- duties = fields.Char(string="职务")
+ duties_id = fields.Many2one(related='users_id.employee_id.job_id', string="职务")
job_type_id = fields.Many2one('hr.job.type', string="岗位类别")
- onboarding_date = fields.Date(string="任职日期")
+ onboarding_date = fields.Date(related='users_id.employee_id.open_start_time', string="任职日期")
end_of_contract = fields.Date(related='users_id.employee_id.open_start_time',string="入职日期")
parent_id = fields.Many2one(related='users_id.employee_id.parent_id', string="直线上级")
business_superior_id = fields.Many2one("hr.employee", string="业务上级")
@@ -42,7 +41,7 @@ class YuthonReassignmentApproval(models.Model):
notice_documents_ids = fields.Many2many('ir.attachment', string="附件")
change_parent_id = fields.Many2one("hr.employee", string="直线上级")
change_business_superior_id = fields.Many2one("hr.employee", string="业务上级")
- change_duties = fields.Char(string="职务")
+ change_duties_id= fields.Many2one('job_id', string="职务")
change_department_id = fields.Many2one("hr.department", string="任职部门")
change_job_type_id = fields.Many2one('hr.job.type', string="岗位类别")
change_job_id = fields.Many2one("hr.job", string="主岗")
diff --git a/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml
index 68298a297..656643471 100644
--- a/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml
@@ -25,19 +25,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/yuthon_hr_employee_approval/views/yuthon_reassignment_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_reassignment_approval_views.xml
index 752b868a9..b7e6903a2 100644
--- a/yuthon_hr_employee_approval/views/yuthon_reassignment_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_reassignment_approval_views.xml
@@ -45,8 +45,7 @@
-
-
+
@@ -63,12 +62,11 @@
-
-
+
diff --git a/yuthon_maintain/models/property_report_repair.py b/yuthon_maintain/models/property_report_repair.py
index 52b21a13c..c756a2c9b 100644
--- a/yuthon_maintain/models/property_report_repair.py
+++ b/yuthon_maintain/models/property_report_repair.py
@@ -13,17 +13,12 @@ class PropertyRentRelief(models.Model):
code = fields.Char(string="报修编号",
default=lambda self: self.env['ir.sequence'].next_by_code('property_report_repair_code'))
users_id = fields.Many2one('res.users', string="报修人", default=lambda self: self.env.user.id)
- repairer_date = fields.Date(string="报修时间")
+ repairer_date = fields.Date(string="报修时间", default=fields.Date.today())
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="报修部门")
repairer_address = fields.Char(string="报修人地址")
+ picture_id = fields.Many2one('ir.attachment', string="图片上传")
fault = fields.Text(string="故障信息")
- dispatch_date = fields.Date(string="派单时间")
- dispatch_head_id = fields.Many2one('hr.employee', string="派单人负责人")
- team_ids = fields.Many2many('hr.employee', string="维修团队")
- completion_time = fields.Datetime(string="预计完成时间")
- dispatch_notes = fields.Text(string="派单备注")
-
urgency = fields.Selection([('low', '低'), ('middle', '中'), ('high', '高')], string="紧急程度")
possible_causes = fields.Selection([('software', '软件问题'), ('hardware', '硬件问题')], string="可能原因")
software_id = fields.Many2one('software.issues.setting', string="具体软件问题")
@@ -32,8 +27,7 @@ class PropertyRentRelief(models.Model):
software_processing_id = fields.Many2one('software.issues.processing', string="处理类型")
hardware_processing_id = fields.Many2one('hardware.issues.processing', string="处理类型")
resolution = fields.Text(string="解决方法")
- documents_ids = fields.Many2many('ir.attachment', string="附件")
- fees = fields.Float(string="费用")
+ picture_resolution_id = fields.Many2one('ir.attachment', string="图片上传")
repair_company = fields.Char(string="维修人/公司")
list_quotations = fields.Many2one('ir.attachment', string="报价清单")
invoice_id = fields.Many2one('ir.attachment', string="发票附件")
@@ -44,7 +38,6 @@ class PropertyRentRelief(models.Model):
software_parts = fields.Char(string="软件名称/版本")
software_fee = fields.Float(string="软件费用")
- duration_service = fields.Float(string="服务时长")
service_fee = fields.Float(string="服务费")
service_fee_total = fields.Float(string="总费用")
service_fee_remark = fields.Text(string="费用备注")
diff --git a/yuthon_maintain/views/all_menu.xml b/yuthon_maintain/views/all_menu.xml
index e039346a7..e0979adc5 100644
--- a/yuthon_maintain/views/all_menu.xml
+++ b/yuthon_maintain/views/all_menu.xml
@@ -4,60 +4,60 @@
False
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yuthon_maintain/views/maintenance_equipment_views.xml b/yuthon_maintain/views/maintenance_equipment_views.xml
index 8e08c432f..5648dce85 100644
--- a/yuthon_maintain/views/maintenance_equipment_views.xml
+++ b/yuthon_maintain/views/maintenance_equipment_views.xml
@@ -8,7 +8,7 @@
-
+
管理员
diff --git a/yuthon_maintain/views/property_report_repair.xml b/yuthon_maintain/views/property_report_repair.xml
index e419fe5f7..bd8516b94 100644
--- a/yuthon_maintain/views/property_report_repair.xml
+++ b/yuthon_maintain/views/property_report_repair.xml
@@ -38,17 +38,7 @@
-
-
-
-
-
-
-
-
-
-
-
+
@@ -57,15 +47,11 @@
-
-
+
-
-
-
@@ -74,12 +60,9 @@
-
-
-
-
-
+
+
diff --git a/yuthon_official/views/inherit_soong_workflow_insector_views.xml b/yuthon_official/views/inherit_soong_workflow_insector_views.xml
index 6ee3c2892..cf640c5f9 100644
--- a/yuthon_official/views/inherit_soong_workflow_insector_views.xml
+++ b/yuthon_official/views/inherit_soong_workflow_insector_views.xml
@@ -1,14 +1,14 @@
- soong.workflow.inspector.form.inherit
- soong.workflow.inspector
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yuthon_work_brand/__manifest__.py b/yuthon_work_brand/__manifest__.py
index 468983fe1..e885976e4 100644
--- a/yuthon_work_brand/__manifest__.py
+++ b/yuthon_work_brand/__manifest__.py
@@ -7,7 +7,7 @@
'hr_holidays', 'hr_payroll', 'yuthon_hr_attendance',
'website', 'yuthon_hr_employee',
'yuthon_salary', 'yuthon_sps_approval',
- 'resource', 'yuthon_hr_employee_approval', 'planning',
+ 'resource', 'yuthon_hr_employee_approval', 'planning', 'yuthon_maintain', 'maintenance',
],
'data': [
'security/ir.model.access.csv',
diff --git a/yuthon_work_brand/views/executive_manage.xml b/yuthon_work_brand/views/executive_manage.xml
index 2105f36f1..a46d543b3 100644
--- a/yuthon_work_brand/views/executive_manage.xml
+++ b/yuthon_work_brand/views/executive_manage.xml
@@ -39,6 +39,63 @@
parent="executive_manage_menu_root_board"
sequence="3"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-