From 1467dbf88cdb7fc9331f96412caf31697af3e927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Mon, 28 Oct 2024 09:44:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=92=E7=A8=8B=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_plan/models/custom_plan.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sf_plan/models/custom_plan.py b/sf_plan/models/custom_plan.py index ec5c8421..bdf916ce 100644 --- a/sf_plan/models/custom_plan.py +++ b/sf_plan/models/custom_plan.py @@ -246,6 +246,7 @@ class sf_production_plan(models.Model): record.date_planned_finished = item.date_planned_finished # 计算下一个cnc工单的开始时间 last_cnc_start = workorder_list[-1].date_planned_finished + timedelta(minutes=pre_duration) + # 没有工单也能排程 record.state = 'done' # record.production_id.schedule_state = '已排' record.sudo().production_id.schedule_state = '已排'