From 22b6b1305fa2ab0c26fd7a2771b1c508c70faaeb Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 14 Apr 2025 15:19:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20handover=E6=8B=86=E6=89=B9=E8=AF=B7?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E8=BD=A6=E9=97=B4=E5=BA=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/services.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/wpm/services.py b/apps/wpm/services.py index 35678c0c..e31eb6c4 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -729,6 +729,8 @@ def handover_submit(handover:Handover, user: User, now: Union[datetime.datetime, elif mtype == Handover.H_DIV: batch = handover_or_b.batch target, _ = BatchSt.g_create(batch=batch, handover=handover, material_start=material) + if handover.wm is None: + raise ParseError('拆批请选择车间库存') source, _ = BatchSt.g_create(batch=handover.wm.batch) BatchLog.g_create(source=source, target=target, handover=handover, relation_type="split") else: