From 6a9f7111f8e76df662f1de07937311e24715804f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Wed, 5 Nov 2025 20:19:07 +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 --- yuthon_holiday/models/inherit_hr_leave_allocation.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/yuthon_holiday/models/inherit_hr_leave_allocation.py b/yuthon_holiday/models/inherit_hr_leave_allocation.py index 53f25985d..b741f5686 100644 --- a/yuthon_holiday/models/inherit_hr_leave_allocation.py +++ b/yuthon_holiday/models/inherit_hr_leave_allocation.py @@ -223,12 +223,9 @@ class HrLeaveAllocation(models.Model): 'vacation_date': date }) - if leave_list: - reports_id.write({'leave_ids': [(5, 0, 0)] + leave_list}) - if compensatory_list: - reports_id.write({'overtime_ids': [(5, 0, 0)] + compensatory_list}) - if other_list: - reports_id.write({'other_fee_ids': [(5, 0, 0)] + other_list}) + reports_id.write({'leave_ids': leave_list}) + reports_id.write({'overtime_ids': compensatory_list}) + reports_id.write({'other_fee_ids': other_list}) # def allocation_date(self): # date = datetime(2025, 1, 1) # leave_id = self.env['hr.leave.allocation'].search([])