From 98204c4ce1cd4c7add8aa60e398976bcdafdcbb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Wed, 4 Mar 2026 19:33:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_catering/models/yuthon_catering.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/yuthon_catering/models/yuthon_catering.py b/yuthon_catering/models/yuthon_catering.py index 305c1fa7f..8b4eebbd6 100644 --- a/yuthon_catering/models/yuthon_catering.py +++ b/yuthon_catering/models/yuthon_catering.py @@ -279,17 +279,8 @@ class YuthonCatering(models.Model): def batch_confirm_catering(self): - from datetime import date as date_cls - valid_months = [ - (2025, 12), - (2026, 1), - (2026, 2), - ] records = self.env['yuthon.catering'].browse(self._context.get('active_ids', [])) - filtered = records.filtered( - lambda r: r.date and (r.date.year, r.date.month) in valid_months - ) - filtered.write({ + records.write({ 'state': 'confirmed', 'breakfast': True, 'lunch': True,