!4451 添加功能

Merge pull request !4451 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2025-08-11 08:09:01 +00:00
committed by Gitee
@@ -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=[