feat: 采购入库节点可复用
This commit is contained in:
parent
016ef53517
commit
7d29b9c4eb
|
@ -673,8 +673,7 @@ class BatchSt(BaseModel):
|
||||||
cls_qs = cls.objects.filter(batch=batch)
|
cls_qs = cls.objects.filter(batch=batch)
|
||||||
if cls_qs.exists():
|
if cls_qs.exists():
|
||||||
if reuse_node:
|
if reuse_node:
|
||||||
node:BatchSt = (cls_qs.filter(mio__isnull=False)|cls_qs.filter(
|
node:BatchSt = (cls_qs.filter(mio__isnull=False)|cls_qs.filter(hanover=None, mio=None, mlog=None)).order_by('-version').first()
|
||||||
material_start__isnull=True)).order_by('-version').first()
|
|
||||||
if node is None:
|
if node is None:
|
||||||
raise ParseError(f"{batch}-该批次号因物料不同不可引用")
|
raise ParseError(f"{batch}-该批次号因物料不同不可引用")
|
||||||
elif node.material_start is None:
|
elif node.material_start is None:
|
||||||
|
|
Loading…
Reference in New Issue