2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 12:05:53 +00:00

Started work on cross-referencing

- part admin now shows total quantity in stock
- part model can return a list of projects it is associated with
This commit is contained in:
Oliver Walters
2017-03-28 21:24:00 +11:00
parent be030991a5
commit 5c8cc035a4
4 changed files with 50 additions and 5 deletions

View File

@ -9,7 +9,8 @@ class Warehouse(InvenTreeTree):
pass
class StockItem(models.Model):
part = models.ForeignKey(Part, on_delete=models.CASCADE)
part = models.ForeignKey(Part,
on_delete=models.CASCADE)
location = models.ForeignKey(Warehouse, on_delete=models.CASCADE)
quantity = models.IntegerField()
updated = models.DateField(auto_now=True)