From f6c747e1d935d1b894a2e86c40a1af186dd27aba Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Mon, 11 Aug 2025 16:08:18 +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/yuthon_vacation_reports.py | 66 ++++++++++--------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py index 07f94a177..43fbbe45c 100644 --- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py +++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py @@ -22,39 +22,43 @@ class YuthonVacationReports(models.Model): other_fee_ids = fields.One2many('vacation.other.line', 'vacation_id', string='其他明细') vacation_date = fields.Date(string='日期', default=lambda self: fields.Date.today()) - done_leave = fields.Float(string='年假', compute='_compute_leave', store=True, digits=(16, 3)) - done_working_overtime = fields.Float(string='加班时', compute='_compute_working_overtime', digits=(16, 3), store=True) - leave = fields.Float(string='剩余年假', compute='_compute_leave', store=True, digits=(16, 3)) - working_overtime = fields.Float(string='剩余加班时', compute='_compute_working_overtime', store=True, digits=(16, 3)) - meal_fee = fields.Integer(string="误餐次数", compute='_compute_meal_fee', store=True) - medical_fee = fields.Float(string="体检费", compute='_compute_medical_fee', store=True) - compensatory_leave = fields.Integer(string="调休", compute='_compute_other_leave', store=True) - leave_of_absence = fields.Float(string="事假", digits=(16, 3), compute='_compute_other_leave', store=True) - statutory_leave = fields.Integer(string="法定假", compute='_compute_other_leave', store=True) - cop_leave = fields.Float(string='补休', digits=(16, 3), compute='_compute_other_leave', store=True) - duty_off_leave = fields.Integer(string='值班调休', compute='_compute_other_leave', store=True) - marriage_leave = fields.Integer(string='婚假', compute='_compute_other_leave', store=True) - maternity_leave = fields.Integer(string='产假', compute='_compute_other_leave', store=True) - paternity_leave = fields.Integer(string='陪产假', compute='_compute_other_leave', store=True) - family_planning_leave = fields.Integer(string='计生假', compute='_compute_other_leave', store=True) - bereavement_leave = fields.Float(string='丧假', compute='_compute_other_leave', store=True) - home_visit_leave = fields.Integer(string='探亲假', compute='_compute_other_leave', store=True) - parents_meeting_leave = fields.Integer(string='家长会假', compute='_compute_other_leave', store=True) - general_sick_leave = fields.Float(string='病假(普通)', digits=(16, 3), compute='_compute_other_leave', store=True) - hospital_sick_leave = fields.Float(string='病假(住院期)', digits=(16, 3), compute='_compute_other_leave', store=True) - recovery_sick_leave = fields.Float(string='病假(出院恢复期)', digits=(16, 3), compute='_compute_other_leave', store=True) - exam_leave = fields.Integer(string='考试假', compute='_compute_other_leave', store=True) - right_days = fields.Float(string='转正天数') - internship_days = fields.Float(string='实习天数') + done_leave = fields.Float(string='年假', compute='_compute_leave', store=True, digits=(16, 3), group_operator=None) + done_working_overtime = fields.Float(string='加班时', compute='_compute_working_overtime', digits=(16, 3), + store=True, group_operator=None) + leave = fields.Float(string='剩余年假', compute='_compute_leave', store=True, digits=(16, 3), group_operator=None) + working_overtime = fields.Float(string='剩余加班时', compute='_compute_working_overtime', store=True, + digits=(16, 3), group_operator=None) + meal_fee = fields.Integer(string="误餐次数", compute='_compute_meal_fee', store=True, group_operator=None) + medical_fee = fields.Float(string="体检费", compute='_compute_medical_fee', store=True, group_operator=None) + compensatory_leave = fields.Integer(string="调休", compute='_compute_other_leave', store=True, group_operator=None) + leave_of_absence = fields.Float(string="事假", digits=(16, 3), compute='_compute_other_leave', store=True, + group_operator=None) + statutory_leave = fields.Integer(string="法定假", compute='_compute_other_leave', store=True, group_operator=None) + cop_leave = fields.Float(string='补休', digits=(16, 3), compute='_compute_other_leave', store=True, + group_operator=None) + duty_off_leave = fields.Integer(string='值班调休', compute='_compute_other_leave', store=True, group_operator=None) + marriage_leave = fields.Integer(string='婚假', compute='_compute_other_leave', store=True, group_operator=None) + maternity_leave = fields.Integer(string='产假', compute='_compute_other_leave', store=True, group_operator=None) + paternity_leave = fields.Integer(string='陪产假', compute='_compute_other_leave', store=True, group_operator=None) + family_planning_leave = fields.Integer(string='计生假', compute='_compute_other_leave', store=True, group_operator=None) + bereavement_leave = fields.Float(string='丧假', compute='_compute_other_leave', store=True, group_operator=None) + home_visit_leave = fields.Integer(string='探亲假', compute='_compute_other_leave', store=True, group_operator=None) + parents_meeting_leave = fields.Integer(string='家长会假', compute='_compute_other_leave', store=True, group_operator=None) + general_sick_leave = fields.Float(string='病假(普通)', digits=(16, 3), compute='_compute_other_leave', store=True, group_operator=None) + hospital_sick_leave = fields.Float(string='病假(住院期)', digits=(16, 3), compute='_compute_other_leave', store=True, group_operator=None) + recovery_sick_leave = fields.Float(string='病假(出院恢复期)', digits=(16, 3), compute='_compute_other_leave', store=True, group_operator=None) + exam_leave = fields.Integer(string='考试假', compute='_compute_other_leave', store=True, group_operator=None) + right_days = fields.Float(string='转正天数', group_operator=None) + internship_days = fields.Float(string='实习天数', group_operator=None) - should_attendance = fields.Integer(string="应到", compute='_compute_attendance_fields', store=True) - actual_attendance = fields.Integer(string="实到", compute='_compute_attendance_fields', store=True) + should_attendance = fields.Integer(string="应到", compute='_compute_attendance_fields', store=True, group_operator=None) + actual_attendance = fields.Integer(string="实到", compute='_compute_attendance_fields', store=True,group_operator=None) - is_late_card = fields.Integer(string="迟到", compute='_compute_attendance_fields', store=True) - is_early_card = fields.Integer(string="早退", compute='_compute_attendance_fields', store=True) - is_no_card = fields.Integer(string="缺卡", compute='_compute_attendance_fields', store=True) - is_work = fields.Integer(string='旷工', compute='_compute_attendance_fields', store=True) - is_abnormal = fields.Integer(string="异常", compute='_compute_attendance_fields', store=True) + is_late_card = fields.Integer(string="迟到", compute='_compute_attendance_fields', store=True, group_operator=None) + is_early_card = fields.Integer(string="早退", compute='_compute_attendance_fields', store=True, group_operator=None) + is_no_card = fields.Integer(string="缺卡", compute='_compute_attendance_fields', store=True, group_operator=None) + is_work = fields.Integer(string='旷工', compute='_compute_attendance_fields', store=True, group_operator=None) + is_abnormal = fields.Integer(string="异常", compute='_compute_attendance_fields', store=True, group_operator=None) vacation_state = fields.Selection( selection=[