diff --git a/InvenTree/build/models.py b/InvenTree/build/models.py index 1ceedf63e2..2ae3f0c5a7 100644 --- a/InvenTree/build/models.py +++ b/InvenTree/build/models.py @@ -237,6 +237,7 @@ class Build(models.Model): for serial in serial_numbers: item = StockItem.objects.create( part=self.part, + build=self, location=location, quantity=1, serial=serial, @@ -250,6 +251,7 @@ class Build(models.Model): # Add stock of the newly created item item = StockItem.objects.create( part=self.part, + build=self, location=location, quantity=self.quantity, batch=str(self.batch) if self.batch else '',