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:
|
for serial in serial_numbers:
|
||||||
item = StockItem.objects.create(
|
item = StockItem.objects.create(
|
||||||
part=self.part,
|
part=self.part,
|
||||||
|
build=self,
|
||||||
location=location,
|
location=location,
|
||||||
quantity=1,
|
quantity=1,
|
||||||
serial=serial,
|
serial=serial,
|
||||||
|
|
@ -250,6 +251,7 @@ class Build(models.Model):
|
||||||
# Add stock of the newly created item
|
# Add stock of the newly created item
|
||||||
item = StockItem.objects.create(
|
item = StockItem.objects.create(
|
||||||
part=self.part,
|
part=self.part,
|
||||||
|
build=self,
|
||||||
location=location,
|
location=location,
|
||||||
quantity=self.quantity,
|
quantity=self.quantity,
|
||||||
batch=str(self.batch) if self.batch else '',
|
batch=str(self.batch) if self.batch else '',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue