从半成品领料bug
This commit is contained in:
parent
8a41c1728e
commit
b8495ee431
|
@ -45,7 +45,7 @@ class WProduct(CommonAModel):
|
|||
production_plan = models.ForeignKey(ProductionPlan, verbose_name='关联主生产计划', on_delete=models.CASCADE)
|
||||
warehouse = models.ForeignKey(WareHouse, verbose_name='所在仓库', on_delete=models.SET_NULL, null=True, blank=True)
|
||||
# operation = models.ForeignKey('wpm.operation', verbose_name='关联操作',
|
||||
# on_delete=models.SET_NULL, null=True, blank=True, related_name='')
|
||||
# on_delete=models.SET_NULL, null=True, blank=True, related_name='current_operation')
|
||||
|
||||
class Operation(CommonADModel):
|
||||
"""
|
||||
|
|
|
@ -56,7 +56,7 @@ class WPlanViewSet(ListModelMixin, GenericViewSet):
|
|||
serializer= PickHalfSerializer(data=request.data, many=True)
|
||||
serializer.is_valid(raise_exception=True)
|
||||
vdata = serializer.data
|
||||
first_step = Step.objects.get(pk=sp.steps[0].id)
|
||||
first_step = Step.objects.get(pk=sp.steps[0]['id'])
|
||||
for i in vdata:
|
||||
if 'wproducts' in i and len(i['wproducts'])>0:
|
||||
spp = SubProductionProgress.objects.get(pk=i['id'])
|
||||
|
|
Loading…
Reference in New Issue