feat: added provider to product batch

This commit is contained in:
Pablo Moreno
2024-05-14 17:59:56 +02:00
parent efae21ee82
commit 3c25c115ca
5 changed files with 63 additions and 6 deletions
+7
View File
@@ -92,6 +92,13 @@ class ProductBatch(models.Model):
expiration_date = models.DateField(
blank=True, null=True, verbose_name=_("Fecha de caducidad / consumo preferente")
)
provider = models.ForeignKey(
"shop.Provider",
on_delete=models.SET_NULL,
blank=True,
null=True,
verbose_name=_("Proveedor"),
)
def __str__(self):
return f"{self.code} - {self.product.name} - {self.quantity}"