2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00
This commit is contained in:
Oliver Walters
2017-03-28 23:25:38 +11:00
parent a5009147c3
commit c111aaf9b2
5 changed files with 19 additions and 14 deletions

View File

@ -5,9 +5,11 @@ from django.db import models
from part.models import Part
from InvenTree.models import InvenTreeTree
class Warehouse(InvenTreeTree):
pass
class StockItem(models.Model):
part = models.ForeignKey(Part,
on_delete=models.CASCADE)
@ -31,6 +33,6 @@ class StockItem(models.Model):
def __str__(self):
return "{n} x {part} @ {loc}".format(
n = self.quantity,
part = self.part.name,
loc = self.location.name)
n=self.quantity,
part=self.part.name,
loc=self.location.name)