From 883d4639cafaf65497057ee749b90df94f04d5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Thu, 5 Mar 2026 15:51:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E6=94=B6=E8=B4=A6=E5=8D=95=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_catering/models/yuthon_catering.py | 21 --- yuthon_catering/views/yuthon_catering.xml | 1 - yuthon_report/models/receivable_report.py | 140 +++++++++++------- .../views/receivable_report_views.xml | 13 +- 4 files changed, 98 insertions(+), 77 deletions(-) diff --git a/yuthon_catering/models/yuthon_catering.py b/yuthon_catering/models/yuthon_catering.py index 663b64d8c..8b4eebbd6 100644 --- a/yuthon_catering/models/yuthon_catering.py +++ b/yuthon_catering/models/yuthon_catering.py @@ -286,27 +286,6 @@ class YuthonCatering(models.Model): 'lunch': True, }) - def fill_today_missing_catering(self): - """生成今天缺失员工的餐饮收集任务数据""" - today = fields.Date.today() - conf = self.env['yuthon.catering.conf'].search([], limit=1) - if not conf or not conf.employee_ids: - return - create_vals = [] - for employee in conf.employee_ids: - existing = self.search([ - ('employee_id', '=', employee.id), - ('date', '=', today), - ], limit=1) - if not existing: - create_vals.append({ - 'date': today, - 'employee_id': employee.id, - 'state': 'unconfirmed', - }) - if create_vals: - self.create(create_vals) - def batch_generate_catering(self): """批量生成2025-12、2026-01、2026-02的餐饮收集任务数据,排除节假日""" from datetime import date as date_cls diff --git a/yuthon_catering/views/yuthon_catering.xml b/yuthon_catering/views/yuthon_catering.xml index 23e520f11..0abf85228 100644 --- a/yuthon_catering/views/yuthon_catering.xml +++ b/yuthon_catering/views/yuthon_catering.xml @@ -13,7 +13,6 @@