fix: 正常交接支持new_wm且支持不合格品

This commit is contained in:
caoqianming 2025-12-29 14:41:06 +08:00
parent c56f908b42
commit ec13b8b166
1 changed files with 1 additions and 1 deletions

View File

@ -785,7 +785,7 @@ def handover_submit(handover:Handover, user: User, now: Union[datetime.datetime,
if handover.type == Handover.H_NORMAL:
if mtype == Handover.H_MERGE and handover.new_wm:
wm_to = handover.new_wm
if wm_to.state != WMaterial.WM_OK or wm_to.material != wm_from.material or wm_to.defect != wm_from.defect:
if wm_to.state != wm_from.state or wm_to.material != wm_from.material or wm_to.defect != wm_from.defect:
raise ParseError("正常合并到的车间库存状态或物料异常")
else:
wm_to, _ = WMaterial.objects.get_or_create(