From b46bb9252cefc37ba70fe02fdf581495a44482e1 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, 4 Mar 2026 16:34:35 +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_hr_attendance/models/yuthon_vacation_reports.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py index c6e778667..92509aeae 100644 --- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py +++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py @@ -189,8 +189,8 @@ class YuthonVacationReports(models.Model): @api.model def meal_line(self): today = date.today() - start_date = date(today.year, today.month, 1) - next_month = today.month + 1 if today.month < 12 else 1 + start_date = date(today.year, today.month - 1, 1) + next_month = today.month if today.month < 12 else 1 next_year = today.year if today.month < 12 else today.year + 1 end_date = date(next_year, next_month, 1) - timedelta(days=1) return { @@ -201,7 +201,8 @@ class YuthonVacationReports(models.Model): 'domain': [ ('vacation_date', '>=', start_date), ('vacation_date', '<=', end_date), - ('company_id', 'in', self.env.companies.ids) + ('company_id', 'in', self.env.companies.ids), + ('text', '!=', '上月额度继承') ], 'target': 'current', 'context': {'tree_view_ref': "yuthon_hr_attendance.view_vacation_meal_line_tree"}