fix: 其他入库允许wpr非必填

This commit is contained in:
caoqianming 2025-03-25 11:17:27 +08:00
parent 0e8cce0669
commit 22e64e5b84
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ class MIOItemCreateSerializer(CustomModelSerializer):
elif len(mioitemw) >= 1:
mio_type = mio.type
for item in mioitemw:
if item.get("wpr", None) is None and mio_type != "pur_in":
if item.get("wpr", None) is None and mio_type != "pur_in" and mio_type != "other_in":
raise ParseError(f'{item["number"]}_请提供产品明细ID')
else:
MIOItemw.objects.create(mioitem=instance, **item)