Nouvel article - Sélection(et/ou création) de fournisseurs

This commit is contained in:
Aurélien Delobelle 2016-08-26 23:44:57 +02:00
parent be8243c4ce
commit ab9bbac34f
7 changed files with 99 additions and 16 deletions

View file

@ -376,6 +376,9 @@ class Supplier(models.Model):
phone = models.CharField(max_length = 10)
comment = models.TextField()
def __str__(self):
return self.name
class SupplierArticle(models.Model):
supplier = models.ForeignKey(
Supplier, on_delete = models.PROTECT)
@ -389,11 +392,19 @@ class SupplierArticle(models.Model):
)
box_type = models.CharField(
choices = BOX_TYPE_CHOICES,
max_length = choices_length(BOX_TYPE_CHOICES))
box_capacity = models.PositiveSmallIntegerField()
price_HT = models.DecimalField(max_digits = 7, decimal_places = 4)
TVA = models.DecimalField(max_digits = 4, decimal_places = 2)
rights = models.DecimalField(max_digits = 7, decimal_places = 4)
max_length = choices_length(BOX_TYPE_CHOICES),
blank = True, null = True, default = None)
box_capacity = models.PositiveSmallIntegerField(
blank = True, null = True, default = None)
price_HT = models.DecimalField(
max_digits = 7, decimal_places = 4,
blank = True, null = True, default = None)
TVA = models.DecimalField(
max_digits = 4, decimal_places = 2,
blank = True, null = True, default = None)
rights = models.DecimalField(
max_digits = 7, decimal_places = 4,
blank = True, null = True, default = None)
class Order(models.Model):
supplier = models.ForeignKey(