feat: mlogbin时从单个拆分为多个批次2
This commit is contained in:
parent
85cc38c842
commit
8f46507a6b
|
@ -588,9 +588,7 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust
|
|||
if material_in.tracking == Material.MA_TRACKING_SINGLE:
|
||||
if mlogbin.count_use == wm_in.count: # 自动创建mlogbw
|
||||
for wpr in Wpr.objects.filter(wm=wm_in).order_by("number"):
|
||||
Mlogbw.objects.get_or_create(wpr=wpr, mlogb=mlogbin, defaults={"number": wpr.number})
|
||||
else:
|
||||
raise ParseError("请提供消耗物料详细编号")
|
||||
Mlogbw.objects.get_or_create(wpr=wpr, mlogb=mlogbin, defaults={"number": wpr.number})
|
||||
|
||||
if qct is None and not (is_fix and mtype == Process.PRO_PROD):
|
||||
mlog.qct = Qct.get(material_out, "process")
|
||||
|
|
Loading…
Reference in New Issue