feat: 仅合格品支持退回

This commit is contained in:
caoqianming 2025-08-04 10:09:23 +08:00
parent 6a93ca31af
commit 7d2fee8409
1 changed files with 2 additions and 0 deletions

View File

@ -885,6 +885,8 @@ def handover_submit(handover:Handover, user: User, now: Union[datetime.datetime,
else:
raise ParseError("改版交接必须指定接收工段")
elif handover.type == Handover.H_BACK:
if wm_from and wm_from.state != WMaterial.WM_OK:
raise ParseError("仅合格品支持退回")
if mtype == Handover.H_MERGE and handover.new_wm:
wm_to = handover.new_wm
else: