mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-29 20:58:14 +00:00
Point new stockitem to the correct build
This commit is contained in:
1 parent
3cef5c93ce
commit
c45c4e236e
1 file changed
+2
@@ -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 '',
|
||||
|
||||
Reference in new issue
Block a user