diff --git a/yuthon_hr_attendance/data/mothly_report_time.xml b/yuthon_hr_attendance/data/mothly_report_time.xml
index c78564dd0..b87d75061 100644
--- a/yuthon_hr_attendance/data/mothly_report_time.xml
+++ b/yuthon_hr_attendance/data/mothly_report_time.xml
@@ -14,19 +14,6 @@
-1
-
- 定时任务:更新我的考勤确认单实到数据
-
- code
- model.monthly_day_report()
-
-
- 1
- days
-
- -1
-
-
定时任务:批量发送考勤确认
diff --git a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py
index f38fb3f21..9b554e17a 100644
--- a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py
@@ -1,3 +1,5 @@
+from email.policy import default
+
from odoo import models, fields, api
from odoo.exceptions import UserError
from datetime import datetime, time, timedelta, date
@@ -10,7 +12,7 @@ class YuthonReassignmentApproval(models.Model):
name = fields.Char(string="标题")
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
- employee_id = fields.Many2one('hr.employee', string="员工姓名")
+ employee_id = fields.Many2one('hr.employee', string="员工姓名", default=lambda self: self.env.user.employee_id.id)
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
company_id = fields.Many2one(related='users_id.employee_id.company_id', string="公司")
code = fields.Char(string="编号",
@@ -55,6 +57,18 @@ class YuthonReassignmentApproval(models.Model):
change_place_of_work = fields.Char(string="工作地点")
handing_information_ids = fields.One2many('yuthon.over.infor.detail.lines','infor_id')
+ @api.onchange('employee_id')
+ def _onchange_employee_id(self):
+ if self.employee_id:
+ self.phone = self.employee_id.mobile_phone
+ self.job_id = self.employee_id.job_id.id
+ self.structure_id = self.employee_id.contract_id.structure_type_id.id
+ self.onboarding_date = self.employee_id.entry_date
+ self.end_of_contract = self.employee_id.entry_date
+ self.parent_id = self.employee_id.parent_id.id
+ self.version = self.employee_id.contract_id.version
+
+
@api.onchange('is_issues')
def _onchange_is_issues(self):
if self.is_issues: