diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py
index 8ed958cb8..cf4777446 100644
--- a/yuthon_holiday/models/inherit_hr_leave.py
+++ b/yuthon_holiday/models/inherit_hr_leave.py
@@ -109,9 +109,6 @@ class HolidaysRequestBatch(models.Model):
'res_model': 'holiday.detail.wizard',
'view_mode': 'form'}
- def put_modify_days(self):
- pass
-
@api.onchange('leave_line_ids')
def _onchange_name(self):
if self.leave_line_ids:
diff --git a/yuthon_hr_attendance/models/yuthon_duty_arrangement.py b/yuthon_hr_attendance/models/yuthon_duty_arrangement.py
index 4938d7b0f..5336f93dc 100644
--- a/yuthon_hr_attendance/models/yuthon_duty_arrangement.py
+++ b/yuthon_hr_attendance/models/yuthon_duty_arrangement.py
@@ -46,4 +46,7 @@ class YuthonDutyArrangement(models.Model):
@api.onchange('duration')
def bottom_auto_schedule(self):
- pass
\ No newline at end of file
+ pass
+
+ def bottom_adjustment(self):
+ pass
diff --git a/yuthon_hr_attendance/views/yuthon_duty_arrangement_views.xml b/yuthon_hr_attendance/views/yuthon_duty_arrangement_views.xml
index b65409616..4ca727c63 100644
--- a/yuthon_hr_attendance/views/yuthon_duty_arrangement_views.xml
+++ b/yuthon_hr_attendance/views/yuthon_duty_arrangement_views.xml
@@ -17,6 +17,7 @@
+
@@ -34,11 +35,11 @@
-
+
-
+
diff --git a/yuthon_hr_employee/models/yuthon_hr_employee.py b/yuthon_hr_employee/models/yuthon_hr_employee.py
index ff227a937..585886c1a 100644
--- a/yuthon_hr_employee/models/yuthon_hr_employee.py
+++ b/yuthon_hr_employee/models/yuthon_hr_employee.py
@@ -69,7 +69,7 @@ class YuthonHrEmployee(models.Model):
open_start_time_today = fields.Date(string="工作至今")
interrupt_work_month = fields.Integer(string="中断工作月数")
cumulative_work_month = fields.Integer(string="累计工作月数", compute='_compute_cumulative_work_month', store=True)
- cumulative_work_years = fields.Char(string="累计工作年限")
+ cumulative_work_years = fields.Char(string="累计工作年限", compute='_compute_cumulative_work_years', store=True)
# 教育
high_degree = fields.Char(string="最高学历")
high_degree2 = fields.Char(string="最高学位")
@@ -194,6 +194,21 @@ class YuthonHrEmployee(models.Model):
result_str = f"{months}个月"
record.social_insurance_time = result_str
+ @api.depends('cumulative_work_month')
+ def _compute_cumulative_work_years(self):
+ for record in self:
+ if record.cumulative_work_month:
+ if record.cumulative_work_month <= 0:
+ record.social_insurance_time = "0个月"
+ years = record.cumulative_work_month // 12
+ months = record.cumulative_work_month % 12
+ if years > 0:
+ result_str = f"{years}年"
+ if months > 0:
+ result_str += f"{months}个月"
+ else:
+ result_str = f"{months}个月"
+ record.cumulative_work_years = result_str
@api.depends('identification_id') # 只依赖身份证号码
def _compute_info(self):