From 0e8501aa8c55b02c5af5bf3fd51d764c786d77f6 Mon Sep 17 00:00:00 2001 From: spl3g Date: Sat, 30 May 2026 15:07:25 +0300 Subject: adjust the product model --- core/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/models.py') diff --git a/core/models.py b/core/models.py index dce67cf..db8b4c1 100644 --- a/core/models.py +++ b/core/models.py @@ -31,7 +31,7 @@ class Product(models.Model): unit = models.CharField(max_length=20) price = models.DecimalField(max_digits=20, decimal_places=2) manufacturer = models.CharField(max_length=200) - supplier = models.CharField(max_length=200) + supplier = models.ForeignKey(Supplier, on_delete=models.SET_NULL, null=True, blank=True) category = models.CharField(max_length=100) discount = models.DecimalField(max_digits=5, decimal_places=2, default=0) quantity = models.IntegerField(default=0) -- cgit v1.2.3