diff --git a/yuthon_hr_attendance/models/remove_holiday_approval.py b/yuthon_hr_attendance/models/remove_holiday_approval.py
index c8fd925b8..db9c24a51 100644
--- a/yuthon_hr_attendance/models/remove_holiday_approval.py
+++ b/yuthon_hr_attendance/models/remove_holiday_approval.py
@@ -13,7 +13,8 @@ class RemoveHolidayApprovals(models.Model):
name = fields.Char(string="标题")
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('overtime_approval'))
date = fields.Datetime(string="日期", default=fields.Datetime.now)
- department_id = fields.Many2one('hr.department', string="申请人部门")
+ users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
partner_id = fields.Many2one('res.partner', string="来文单位")
statu = fields.Selection([('drft', '草稿'), ('going', '执行中'), ('cancel', '已取消'), ('done', '已完成')], string="状态",
default='drft')
diff --git a/yuthon_hr_attendance/views/remove_holiday_approval.xml b/yuthon_hr_attendance/views/remove_holiday_approval.xml
index aa454454d..61196d176 100644
--- a/yuthon_hr_attendance/views/remove_holiday_approval.xml
+++ b/yuthon_hr_attendance/views/remove_holiday_approval.xml
@@ -7,6 +7,7 @@
+
@@ -23,6 +24,7 @@
+
@@ -39,7 +41,7 @@
-
+
diff --git a/yuthon_hr_employee_approval/models/inherit_hr_employee.py b/yuthon_hr_employee_approval/models/inherit_hr_employee.py
index 24c5e3ef4..51f748d71 100644
--- a/yuthon_hr_employee_approval/models/inherit_hr_employee.py
+++ b/yuthon_hr_employee_approval/models/inherit_hr_employee.py
@@ -10,6 +10,7 @@ class YuthonHrEmployee(models.Model):
record_id = self.env["hr.employee"].browse(self._context.get('active_ids', self._context.get('active_id')))
if len(record_id) != 1:
raise UserError("请选择一个员工")
+ user_id = record_id.user_id
form_id = self.env.ref('yuthon_hr_employee_approval.view_yuthon_reassignment_approval_form').id
return {
"type": "ir.actions.act_window",
@@ -17,12 +18,13 @@ class YuthonHrEmployee(models.Model):
"res_model": "yuthon.reassignment.approval",
"views": [[form_id, "form"]],
"context":{
- 'default_employee_id':record_id.id,
+ 'default_users_id':user_id.id,
}
}
def pub_leaving_employee(self):
record_id = self.env["hr.employee"].browse(self._context.get('active_ids', self._context.get('active_id')))
+ user_id = record_id.user_id
if len(record_id) != 1:
raise UserError("请选择一个员工")
form_id = self.env.ref('yuthon_hr_employee_approval.view_yuthon_leaving_approval_form').id
@@ -32,13 +34,14 @@ class YuthonHrEmployee(models.Model):
"res_model": "yuthon.leaving.approval",
"views": [[form_id, "form"]],
"context": {
- 'default_employee_id':record_id.id,
+ 'default_employee_id':user_id.id,
}
}
def pub_regularization_employee(self):
record_id = self.env["hr.employee"].browse(self._context.get('active_ids', self._context.get('active_id')))
+ user_id = record_id.user_id
if len(record_id) != 1:
raise UserError("请选择一个员工")
form_id = self.env.ref('yuthon_hr_employee_approval.view_yuthon_regularization_approval_form').id
@@ -48,6 +51,6 @@ class YuthonHrEmployee(models.Model):
"res_model": "yuthon.regularization.approval",
"views": [[form_id, "form"]],
"context": {
- 'default_employee_id':record_id.id,
+ 'default_employee_id':user_id.id,
}
}
diff --git a/yuthon_hr_employee_approval/models/yuthon_appointment_approval.py b/yuthon_hr_employee_approval/models/yuthon_appointment_approval.py
index deacb75d2..f763e4d3e 100644
--- a/yuthon_hr_employee_approval/models/yuthon_appointment_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_appointment_approval.py
@@ -10,8 +10,8 @@ class YuthonAppointmentApproval(models.Model):
code = fields.Char(string="编号",
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_appointment_approval_code'))
company_id = fields.Many2one('hr.department', string="单位")
- department_id = fields.Many2one('hr.department', string="部门")
- entrant = fields.Many2one('hr.employee', string="录入人")
+ users_id = fields.Many2one('res.users', string="录入人", default=lambda self: self.env.user.id)
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
entrant_date = fields.Date(string="录入日期")
entrant_illustrate = fields.Text(string="录入说明")
documents_ids = fields.Many2many('documents.document', string="附件")
diff --git a/yuthon_hr_employee_approval/models/yuthon_interview_approval.py b/yuthon_hr_employee_approval/models/yuthon_interview_approval.py
index cfd43fffe..dcd1401fb 100644
--- a/yuthon_hr_employee_approval/models/yuthon_interview_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_interview_approval.py
@@ -10,8 +10,10 @@ class YuthonInterviewApproval(models.Model):
_inherit = 'soong.workflow.mixin'
name = fields.Char(string='标题')
+ users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
job_id = fields.Many2one('hr.job', string='应聘岗位')
- department_id = fields.Many2one("hr.department", string="应聘职务")
+ departments_id = fields.Many2one("hr.department", string="应聘职务")
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_interview_approval_code'))
applicant_ids = fields.One2many('interview.approval.line', 'interview_approval_id', string='应聘面试信息')
is_issues = fields.Boolean(string='是否上会')
diff --git a/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py b/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py
index c8c5a8a78..aaae174e2 100644
--- a/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py
@@ -7,23 +7,24 @@ class YuthonLeavingApproval(models.Model):
_description = '离职申请'
_inherit = 'soong.workflow.mixin'
- employee_id = fields.Many2one('hr.employee', string='姓名')
+ users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
contract = fields.Many2one('hr.contract', string='合同')
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_leaving_approval_code'))
- phone = fields.Char(related='employee_id.work_phone',string='手机号')
+ phone = fields.Char(related='users_id.employee_id.work_phone',string='手机号')
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
('thlc', '天河粮储'), ('tctj', '天投城建')], string="任职单位")
- department_id = fields.Many2one(related='employee_id.department_id', string="任职部门")
- job_id = fields.Many2one(related='employee_id.job_id', string="主岗")
+
+ job_id = fields.Many2one(related='users_id.employee_id.job_id', string="主岗")
duties = fields.Char(string="职务")
- job_lv_id = fields.Many2one(related='employee_id.job_lv_id', string='职级')
+ job_lv_id = fields.Many2one(related='users_id.employee_id.job_lv_id', string='职级')
job_type_id = fields.Many2one('hr.job.type', string="岗位类别")
- onboarding_date = fields.Date(related='employee_id.entry_date',string="入职日期")
+ onboarding_date = fields.Date(related='users_id.employee_id.entry_date',string="入职日期")
end_of_contract = fields.Date(string="合同结束日期")
expected_departure_date = fields.Date(string="预计离职日期")
- parent_id = fields.Many2one(related='employee_id.parent_id', string="直线上级")
+ parent_id = fields.Many2one(related='users_id.employee_id.parent_id', string="直线上级")
business_superior = fields.Many2one("hr.employee", string="业务上级")
- use_user_type = fields.Selection(related="employee_id.use_user_type", string="聘用形式")
+ use_user_type = fields.Selection(related="users_id.employee_id.use_user_type", string="聘用形式")
type_resignation = fields.Selection([('1', '个人辞职'), ('2', '被动离职')], string="辞职类型")
application_data = fields.Date(string="申请日期")
notice_documents_ids= fields.Many2many('documents.document', string="辞职申请")
diff --git a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py
index 28ea821bf..26a9d00c5 100644
--- a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py
@@ -23,7 +23,8 @@ class YuthonOnboardApproval(models.Model):
code = fields.Char(string="编号",
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_onboard_approval_code'))
employee_id = fields.Many2one('hr.employee', string='姓名')
-
+ users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
('thlc', '天河粮储'), ('tctj', '天投城建')], string="甲方")
grades_id = fields.Many2one('yuthon.job.lv', string='职级')
diff --git a/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py b/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py
index c8761dfcc..5ae657901 100644
--- a/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py
@@ -7,10 +7,10 @@ class YuthonPrepareApproval(models.Model):
_description = '编制调整需求表'
_inherit = 'soong.workflow.mixin'
- employee_id = fields.Many2one('hr.employee', string='申请人', default=lambda self: self.env.user.employee_id)
+ users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_prepare_approval_code'))
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司")
- department_id = fields.Many2one("hr.department", string="部门",)
name = fields.Char(string='标题')
reason = fields.Html(string="正文")
is_issues = fields.Boolean(string='是否上会')
diff --git a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py
index d7becd33b..467a22e19 100644
--- a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py
@@ -7,23 +7,23 @@ class YuthonReassignmentApproval(models.Model):
_description = '调岗申请'
_inherit = 'soong.workflow.mixin'
- employee_id = fields.Many2one('hr.employee', string='姓名')
+ users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
code = fields.Char(string="编号",
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_reassignment_approval_code'))
- phone = fields.Char(related='employee_id.work_phone',string='联系电话')
+ phone = fields.Char(related='users_id.employee_id.work_phone',string='联系电话')
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
('thlc', '天河粮储'), ('tctj', '天投城建')], string="任职单位")
- department_id = fields.Many2one(related='employee_id.department_id', string="任职部门")
- job_id = fields.Many2one(related='employee_id.job_id', string="主岗")
+ job_id = fields.Many2one(related='users_id.employee_id.job_id', string="主岗")
duties = fields.Char(string="职务")
- job_lv_id = fields.Many2one(related='employee_id.job_lv_id', string='职级')
+ job_lv_id = fields.Many2one(related='users_id.employee_id.job_lv_id', string='职级')
job_type_id = fields.Many2one('hr.job.type', string="岗位类别")
onboarding_date = fields.Date(string="任职日期")
- end_of_contract = fields.Date(related='employee_id.entry_date',string="入职日期")
- parent_id = fields.Many2one(related='employee_id.parent_id', string="直线上级")
+ end_of_contract = fields.Date(related='users_id.employee_id.entry_date',string="入职日期")
+ parent_id = fields.Many2one(related='users_id.employee_id.parent_id', string="直线上级")
business_superior_id = fields.Many2one("hr.employee", string="业务上级")
place_of_work = fields.Char(string="工作地点")
- use_user_type = fields.Selection(related="employee_id.use_user_type", string="聘用形式")
+ use_user_type = fields.Selection(related="users_id.employee_id.use_user_type", string="聘用形式")
person_attributes = fields.Selection([('in', '编制内'), ('out', '编制外')], string="人员属性")
is_issues = fields.Boolean(string='是否上会')
related_issues_id = fields.Many2one('issue.library', string="关联议题")
diff --git a/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py b/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py
index 205fab788..ce46b8bfc 100644
--- a/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py
@@ -10,7 +10,7 @@ class YuthonRecruitmentApproval(models.Model):
_inherit = 'soong.workflow.mixin'
name = fields.Char(string='标题')
- employee_id = fields.Many2one('hr.employee', string='申请人', default=lambda self: self.env.user.employee_id)
+ users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_recruitment_approval_code'))
reason = fields.Html(string="正文")
recruitment_ids = fields.One2many('hr.job', 'recruitment_approval_id', string="招聘申请")
@@ -20,7 +20,7 @@ class YuthonRecruitmentApproval(models.Model):
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司")
- department_id = fields.Many2one("hr.department", string="部门")
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
@api.onchange('is_issues')
def _onchange_is_issues(self):
diff --git a/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py b/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py
index 72eed2730..f8578a2de 100644
--- a/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py
@@ -7,20 +7,20 @@ class YuthonRegularizationPrepareApproval(models.Model):
_description = '转正申请表'
_inherit = 'soong.workflow.mixin'
- employee_id = fields.Many2one('hr.employee', string='姓名')
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
+ users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
code = fields.Char(string="编号",
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_regularization_approval_code'))
- department_id = fields.Many2one(related='employee_id.department_id', string="任职部门")
- job_id = fields.Many2one(related='employee_id.job_id', string="主岗")
+ job_id = fields.Many2one(related='users_id.employee_id.job_id', string="主岗")
phone = fields.Char(string='手机号')
job = fields.Char(string="职务")
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
('thlc', '天河粮储'), ('tctj', '天投城建')], string="任职单位")
job_type_id = fields.Many2one('hr.job.type', string="岗位类别")
- job_lv_id = fields.Many2one(related='employee_id.job_lv_id', string='职级')
- onboarding_time = fields.Date(related='employee_id.entry_date',string="入职日期")
+ job_lv_id = fields.Many2one(related='users_id.employee_id.job_lv_id', string='职级')
+ onboarding_time = fields.Date(related='users_id.employee_id.entry_date',string="入职日期")
trial_end_date = fields.Date(string="试用期结束日期")
- parent_id = fields.Many2one(related='employee_id.parent_id',string="直线上级")
+ parent_id = fields.Many2one(related='users_id.employee_id.parent_id',string="直线上级")
business_leader = fields.Char(string="业务线上级")
is_issues = fields.Boolean(string='是否上会')
related_issues_id = fields.Many2one('issue.library', string="关联议题")
diff --git a/yuthon_hr_employee_approval/models/yuthon_reward_approval.py b/yuthon_hr_employee_approval/models/yuthon_reward_approval.py
index b4b2f394b..40e7a1a1b 100644
--- a/yuthon_hr_employee_approval/models/yuthon_reward_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_reward_approval.py
@@ -12,8 +12,10 @@ class YuthonRewardApproval(models.Model):
documents_ids = fields.Many2many('ir.attachment', string='议题附件')
code = fields.Char(string="编号",
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_salary_approval_code'))
- company_id = fields.Many2one("res.company", string="单位")
- entrant = fields.Many2one('hr.employee', string="录入人")
+ yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
+ ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司")
+ users_id = fields.Many2one('res.users', string="录入人", default=lambda self: self.env.user.id)
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
entrant_date = fields.Date(string="录入日期")
entrant_illustrate = fields.Text(string="录入说明")
notice_documents_ids = fields.Many2many('documents.document', string="附件")
diff --git a/yuthon_hr_employee_approval/models/yuthon_service_approval.py b/yuthon_hr_employee_approval/models/yuthon_service_approval.py
index ebf79e795..a6406f317 100644
--- a/yuthon_hr_employee_approval/models/yuthon_service_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_service_approval.py
@@ -11,7 +11,8 @@ class YuthonServiceApproval(models.Model):
code = fields.Char(string="编号",
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_service_approval_code'))
service_type = fields.Selection([('done', '在职证明'), ('leaving', '离职证明'), ('income', '收入类型')], string="服务类型")
- employee_id = fields.Many2one('hr.employee', string='姓名')
+ users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
tenant_user_card = fields.Char(string="身份证")
onboarding_time = fields.Date(string="入职时间")
job_id = fields.Many2one('hr.job', string="岗位")
diff --git a/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py b/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py
index 190350cfc..f66dae2ed 100644
--- a/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py
@@ -7,12 +7,14 @@ class YutransferApproval(models.Model):
_inherit = ['soong.workflow.mixin']
_description = '工作移交'
+ name = fields.Char(string="标题")
documents_ids = fields.Many2many('ir.attachment', string='议题附件')
code = fields.Char(string="编号",
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_leaving_approval_code'))
- resignation_name = fields.Char(string='姓名')
- company_id = fields.Many2one("res.company", string="任职单位")
- department_id = fields.Many2one("hr.department", string="任职部门")
+ users_id = fields.Many2one('res.users', string="录入人", default=lambda self: self.env.user.id)
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
+ yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
+ ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司")
main_post = fields.Many2one("hr.job", string="主岗")
duties = fields.Char(string="职务")
grades = fields.Many2one('yuthon.job.lv', string='职级')
@@ -21,7 +23,7 @@ class YutransferApproval(models.Model):
end_of_contract = fields.Date(string="任现职日期")
straight_superiors = fields.Many2one("hr.employee", string="直线上级")
business_superior = fields.Many2one("hr.employee", string="业务上级")
-
+ issue_text = fields.Text(string="事由")
handover_date = fields.Date(string="移交日期")
handover_person_id = fields.Many2one("hr.employee", string="工作接交人")
notification_change_id = fields.Many2one("hr.employee", string="告知人员")
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 d7bfc5622..f8b33e8f3 100644
--- a/yuthon_hr_employee_approval/views/yuthon_appointment_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_appointment_approval_views.xml
@@ -6,7 +6,7 @@
-
+
@@ -26,7 +26,7 @@
-
+
@@ -38,6 +38,7 @@
+
@@ -56,9 +57,6 @@
-
-
-
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 2ee4fce44..e9eb55a86 100644
--- a/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_interview_approval_views.xml
@@ -25,12 +25,14 @@
+
-
+
+
diff --git a/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml
index 9953126a5..394ce2bd3 100644
--- a/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml
@@ -5,7 +5,7 @@
yuthon.leaving.approval
-
+
@@ -23,7 +23,7 @@
-
+
@@ -67,10 +67,10 @@
+
-
diff --git a/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml
index e21ac9ba0..af311a2c2 100644
--- a/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml
@@ -28,10 +28,13 @@
+
+
+
@@ -83,9 +86,6 @@
-
-
-
diff --git a/yuthon_hr_employee_approval/views/yuthon_prepare_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_prepare_approval_views.xml
index 5bf22d633..0c036502f 100644
--- a/yuthon_hr_employee_approval/views/yuthon_prepare_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_prepare_approval_views.xml
@@ -7,7 +7,7 @@
-
+
@@ -20,12 +20,13 @@
-
-
+
+
+
-
+
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 7dc7cf3cd..9bea3c2b5 100644
--- a/yuthon_hr_employee_approval/views/yuthon_reassignment_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_reassignment_approval_views.xml
@@ -5,7 +5,7 @@
yuthon.reassignment.approval
-
+
@@ -24,7 +24,7 @@
-
+
@@ -73,6 +73,7 @@
+
@@ -95,9 +96,6 @@
-
-
-
diff --git a/yuthon_hr_employee_approval/views/yuthon_recruitment_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_recruitment_approval_views.xml
index d7be3ca63..ef786091e 100644
--- a/yuthon_hr_employee_approval/views/yuthon_recruitment_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_recruitment_approval_views.xml
@@ -6,7 +6,7 @@
-
+
@@ -19,13 +19,14 @@
-
+
+
-
+
@@ -73,9 +74,6 @@
-
-
-
diff --git a/yuthon_hr_employee_approval/views/yuthon_regularization_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_regularization_approval_views.xml
index 83cfac9b6..8f252b413 100644
--- a/yuthon_hr_employee_approval/views/yuthon_regularization_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_regularization_approval_views.xml
@@ -5,7 +5,7 @@
yuthon.regularization.approval
-
+
@@ -27,7 +27,7 @@
-
+
@@ -62,6 +62,7 @@
+
@@ -78,9 +79,6 @@
-
-
-
diff --git a/yuthon_hr_employee_approval/views/yuthon_reward_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_reward_approval_views.xml
index 891b9e41a..92f05b1eb 100644
--- a/yuthon_hr_employee_approval/views/yuthon_reward_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_reward_approval_views.xml
@@ -7,8 +7,8 @@
-
-
+
+
@@ -23,15 +23,17 @@
-
+
+
-
+
+
@@ -40,7 +42,6 @@
-
@@ -54,9 +55,7 @@
-
-
diff --git a/yuthon_hr_employee_approval/views/yuthon_service_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_service_approval_views.xml
index e3c975c83..0f8e64435 100644
--- a/yuthon_hr_employee_approval/views/yuthon_service_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_service_approval_views.xml
@@ -7,7 +7,7 @@
-
+
@@ -27,24 +27,21 @@
-
+
+
+
-
+
-
-
-
-
-
diff --git a/yuthon_hr_employee_approval/views/yuthon_transfer_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_transfer_approval_views.xml
index bd8399277..f862795f2 100644
--- a/yuthon_hr_employee_approval/views/yuthon_transfer_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_transfer_approval_views.xml
@@ -6,8 +6,8 @@
-
-
+
+
@@ -23,8 +23,8 @@
-
-
+
+
@@ -43,7 +43,7 @@
-
+
@@ -51,13 +51,16 @@
+
-
-
-
+
+
+
+
+
@@ -70,9 +73,6 @@
-
-
-
diff --git a/yuthon_performance/models/yuthon_employee_approval.py b/yuthon_performance/models/yuthon_employee_approval.py
index e34fb085f..97e4f8472 100644
--- a/yuthon_performance/models/yuthon_employee_approval.py
+++ b/yuthon_performance/models/yuthon_employee_approval.py
@@ -8,6 +8,8 @@ class YuthonEmployeeApproval(models.Model):
_inherit = 'soong.workflow.mixin'
name = fields.Char('标题')
+ users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
creation_time = fields.Datetime(string='申请日期', default=lambda self: fields.Datetime.now())
job_id = fields.Many2one('hr.job', string="岗位")
reason_text = fields.Html(string='申请事由')
diff --git a/yuthon_performance/models/yuthon_tissue_duty_approval.py b/yuthon_performance/models/yuthon_tissue_duty_approval.py
index b6b70d307..4f9d5ae93 100644
--- a/yuthon_performance/models/yuthon_tissue_duty_approval.py
+++ b/yuthon_performance/models/yuthon_tissue_duty_approval.py
@@ -8,6 +8,8 @@ class YuthonTissueDutyApproval(models.Model):
_rec_name = 'name'
name = fields.Char('标题')
+ users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
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="岗位")
diff --git a/yuthon_performance/views/yuthon_employee_approval.xml b/yuthon_performance/views/yuthon_employee_approval.xml
index 7687d8589..0ff562f84 100644
--- a/yuthon_performance/views/yuthon_employee_approval.xml
+++ b/yuthon_performance/views/yuthon_employee_approval.xml
@@ -7,6 +7,8 @@
+
+
@@ -20,11 +22,13 @@
+
+
diff --git a/yuthon_performance/views/yuthon_tissue_duty_approval.xml b/yuthon_performance/views/yuthon_tissue_duty_approval.xml
index bd1404b3b..b70a89a99 100644
--- a/yuthon_performance/views/yuthon_tissue_duty_approval.xml
+++ b/yuthon_performance/views/yuthon_tissue_duty_approval.xml
@@ -7,6 +7,8 @@
+
+
@@ -20,11 +22,13 @@
+
+