feat: Handover正常交接不支持不合格品
This commit is contained in:
parent
2da98efca8
commit
c03129ae81
|
|
@ -747,7 +747,7 @@ class HandoverSerializer(CustomModelSerializer):
|
||||||
# raise ParseError(f'第{ind+1}物料与交接部门不一致')
|
# raise ParseError(f'第{ind+1}物料与交接部门不一致')
|
||||||
if attrs["material"] != wm.material:
|
if attrs["material"] != wm.material:
|
||||||
raise ParseError(f'第{ind+1}物料与交接物料不一致')
|
raise ParseError(f'第{ind+1}物料与交接物料不一致')
|
||||||
if wm.notok_sign is not None and attrs['type'] in [Handover.H_NORMAL, Handover.H_TEST]:
|
if (wm.notok_sign or wm.defect) and attrs['type'] in [Handover.H_NORMAL, Handover.H_TEST]:
|
||||||
raise ParseError(f'第{ind+1}物料不合格,不能进行正常/检验交接')
|
raise ParseError(f'第{ind+1}物料不合格,不能进行正常/检验交接')
|
||||||
if wm.count_xtest is not None:
|
if wm.count_xtest is not None:
|
||||||
raise ParseError(f'第{ind+1}物料检验中,不能进行交接')
|
raise ParseError(f'第{ind+1}物料检验中,不能进行交接')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue