diff --git a/InvenTree/build/models.py b/InvenTree/build/models.py index 50f78f8a3d..449776579e 100644 --- a/InvenTree/build/models.py +++ b/InvenTree/build/models.py @@ -698,7 +698,7 @@ class Build(MPTTModel): raise ValidationError(_("Build output does not match Build Order")) # Unallocate all build items against the output - self.unallocateOutput(output) + self.unallocateStock(output=output) # Remove the build output from the database output.delete() diff --git a/InvenTree/build/test_build.py b/InvenTree/build/test_build.py index 04b46bbd26..a0874d0979 100644 --- a/InvenTree/build/test_build.py +++ b/InvenTree/build/test_build.py @@ -250,7 +250,7 @@ class BuildTest(TestCase): self.assertEqual(len(unallocated), 1) - self.build.unallocateUntracked() + self.build.unallocateStock() unallocated = self.build.unallocatedParts(None)