fix del customer and phone number feild

This commit is contained in:
javad committed 2026-07-15 22:54:29 +03:30
1 parent 8d5665a1dc
commit c33184a996
5 files changed
+296 -68

No files matched your search

+6 -3
View File
@@ -58,9 +58,12 @@ class Customer(models.Model):
self.save()
class PhoneNumber(models.Model):
customer = models.ForeignKey(Customer, on_delete=models.CASCADE)
phone_number = models.CharField(max_length=11)
customer = models.ForeignKey(Customer, on_delete=models.CASCADE, related_name='phones')
title = models.CharField(max_length=50, default='تلفن', blank=True, null=True, help_text="عنوان شماره (مثل: موبایل پدر)")
phone_number = models.CharField(max_length=20)
def __str__(self):
return f"{self.title}: {self.phone_number}"
class StoreRoom(models.Model):
class Meta: