mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
Addition of the StockItem class
This commit is contained in:
parent
402a14d69a
commit
fdfd7e7388
@ -8,3 +8,14 @@ class Stock(models.Model):
|
|||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
|
class StockItem(models.Model):
|
||||||
|
""" The StockItem class, element of the stock """
|
||||||
|
name = models.CharField(_('name'), max_length=64)
|
||||||
|
unit_quantity = models.IntegerField(_('unit quantity'), default=0)
|
||||||
|
effective_quantity = models.IntegerField(_('effective quantity'), default=0)
|
||||||
|
stock_owner = models.ForeignKey(Stock, related_name="stock_owner")
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.name
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user