Point new stockitem to the correct build
This commit is contained in:
parent
3cef5c93ce
commit
c45c4e236e
|
|
@ -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 '',
|
||||
|
|
|
|||
Loading…
Reference in New Issue