From 0ad11e002052483efb850db86e007e7f038251f7 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, 11 Mar 2026 09:37:09 +0800 Subject: [PATCH 1/3] =?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 --- soong_workflow/models/soong_workflow_record.py | 6 ++++-- yuthon_property_approval/models/inherit_yuthon_property.py | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/soong_workflow/models/soong_workflow_record.py b/soong_workflow/models/soong_workflow_record.py index 3354c239f..a5e9e7548 100644 --- a/soong_workflow/models/soong_workflow_record.py +++ b/soong_workflow/models/soong_workflow_record.py @@ -558,12 +558,14 @@ class SoongWorkflowRecord(models.Model): log_model = "soong.workflow.log" if record_id.log_ids2: log_model = "soong.workflow.log2" + approval_state = '2' elif record_id.log_ids: log_model = "soong.workflow.log" + approval_state = '3' if log_records: log_records[-1].write({ - 'approval_state': '3', + 'approval_state': approval_state, 'lase_click_date': current_datetime, }) else: @@ -573,7 +575,7 @@ class SoongWorkflowRecord(models.Model): 'workflow_id': workflow.workflow_id.id, 'model': workflow.res_model, 'res_id': workflow.res_id, - 'approval_state': '3', + 'approval_state': approval_state, 'lase_click_date': current_datetime, 'sequence': 99, }) diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index 624ea8e03..9c4d9477b 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -71,7 +71,6 @@ class MeterArchivesLine(models.Model): for record in archives_ids: record.lessee_id = record.contract_id.lessee_id.id - class MeterWaterLine(models.Model): _inherit = 'meter.water.line' From 32b0a842735d15ef444abd8a2d899f57f9b5362c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Wed, 11 Mar 2026 09:51:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=87=87=E8=B4=AD=EF=BC=8C=E9=A4=90?= =?UTF-8?q?=E9=A5=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_catering/models/yuthon_catering.py | 32 ++----------------- yuthon_catering/views/yuthon_catering.xml | 2 +- .../models/inherit_purchase_order.py | 1 + .../views/inherit_purchase_order_views.xml | 3 ++ 4 files changed, 8 insertions(+), 30 deletions(-) diff --git a/yuthon_catering/models/yuthon_catering.py b/yuthon_catering/models/yuthon_catering.py index d79413d10..74c902a8a 100644 --- a/yuthon_catering/models/yuthon_catering.py +++ b/yuthon_catering/models/yuthon_catering.py @@ -305,10 +305,10 @@ class YuthonCatering(models.Model): 'lunch': True, }) - def fill_march6_missing_catering(self): - """表3月10日缺失员工的餐饮收集任务数据""" + def fill_march11_missing_catering(self): + """表3月11日缺失员工的餐饮收集任务数据""" from datetime import date as date_cls - target_date = date_cls(2026, 3, 10) + target_date = date_cls(2026, 3, 11) conf_records = self.env['yuthon.catering.conf'].search([]) if not conf_records: return @@ -330,32 +330,6 @@ class YuthonCatering(models.Model): if create_vals: self.create(create_vals) - def cron_fill_today_missing(self): - """定时任务:自动补全当天缺失的餐饮收集数据,每天晚21:00执行,节假日/周末不触发""" - today = fields.Date.today() - if not self._process_shift_days(today): - return - conf_records = self.env['yuthon.catering.conf'].search([]) - if not conf_records: - return - employee_ids = conf_records.mapped('employee_ids') - if not employee_ids: - return - create_vals = [] - for employee in 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 f7c4fa97a..769a2f2c2 100644 --- a/yuthon_catering/views/yuthon_catering.xml +++ b/yuthon_catering/views/yuthon_catering.xml @@ -13,7 +13,7 @@