Commit fdfd7e73 authored by Lo-J's avatar Lo-J

Addition of the StockItem class

parent 402a14d6
......@@ -7,4 +7,15 @@ class Stock(models.Model):
counter = models.OneToOneField(Counter, verbose_name=_('counter'), related_name='stock')
def __str__(self):
\ No newline at end of file
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):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment