From 9cbb5a51d1aa55f4439558aa767fc28064340e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Sat, 7 Feb 2026 19:13:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_hr_attendance/models/yuthon_holiday_statement.py | 1 + yuthon_hr_attendance/models/yuthon_vacation_reports.py | 5 +++++ yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/yuthon_hr_attendance/models/yuthon_holiday_statement.py b/yuthon_hr_attendance/models/yuthon_holiday_statement.py index 492accd77..6890eb57f 100644 --- a/yuthon_hr_attendance/models/yuthon_holiday_statement.py +++ b/yuthon_hr_attendance/models/yuthon_holiday_statement.py @@ -12,6 +12,7 @@ class InheritHrLeave(models.Model): caption = fields.Char(string="标题", compute="_compute_application_reason") employee_id = fields.Many2one('hr.employee', string="发起人") + phone = fields.Char(related='employee_id.phone', string="手机号") length_leave = fields.Float(string="请假时长", compute="_compute_application_reason") leave_stats = fields.Char(string="请假统计", compute="_compute_leave_stats") is_filing = fields.Boolean(string="归档") diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py index 2f014b047..7adc2a9eb 100644 --- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py +++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py @@ -1649,6 +1649,9 @@ class VacationOverline(models.Model): is_initial_number = fields.Boolean(string="初始额度") overtime_name = fields.Char(string="标题", compute="_compute_overtime", store=True) + reason_application = fields.Text(string="事由", compute="_compute_overtime", default=None, store=True) + meal = fields.Selection([('yes', '是'), ('no', '否')], string="误餐费", compute="_compute_overtime", default=None, store=True) + workflow_id = fields.Many2one(relate = 'workflow_record_id.workflow_id', string = '审批类型', store=True) start_time = fields.Datetime(string="开始时间", compute="_compute_overtime", store=True) end_time = fields.Datetime(string="结束时间", compute="_compute_overtime", store=True) carry_forward_date = fields.Date(string="结转日期") @@ -1786,6 +1789,8 @@ class VacationOverline(models.Model): if res_model and res_id and res_model in self.env: overtime_id = rec.env[res_model].search([('id', '=', res_id)], limit=1) if overtime_id: + rec.meal = overtime_id.meal + rec.reason_application = overtime_id.reason_application rec.overtime_name = overtime_id.name or '' rec.start_time = overtime_id.start_time or '' rec.end_time = overtime_id.end_time or '' diff --git a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml index 18465ff53..906d4be8e 100644 --- a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml +++ b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml @@ -633,6 +633,9 @@ + + +