diff --git a/hb_server/apps/pm/views.py b/hb_server/apps/pm/views.py index 4805099..d50ffae 100644 --- a/hb_server/apps/pm/views.py +++ b/hb_server/apps/pm/views.py @@ -76,9 +76,9 @@ class ProductionPlanViewSet(CreateUpdateModelAMixin, ListModelMixin, CreateModel start_date=production_plan.start_date, end_date=production_plan.end_date, workshop=i.process.workshop, process=i.process, create_by=request.user, steps = list(steps)) - for m in InputMaterial.objects.filter(subproduction=i, is_delete=False).order_by('sort'): + for m in InputMaterial.objects.filter(subproduction=i, is_deleted=False).order_by('sort'): SubProductionProgress.objects.create(material=m.material, type=1, count=m.count, subproduction_plan=instance) - for m in OutputMaterial.objects.filter(subproduction=i, is_delete=False).order_by('sort'): + for m in OutputMaterial.objects.filter(subproduction=i, is_deleted=False).order_by('sort'): SubProductionProgress.objects.create(material=m.material, type=2, count=m.count, subproduction_plan=instance) production_plan.is_planed=True production_plan.save()