diff --git a/tienda_ilusion/don_confiao/models.py b/tienda_ilusion/don_confiao/models.py index 6d40cac..7d7ee0a 100644 --- a/tienda_ilusion/don_confiao/models.py +++ b/tienda_ilusion/don_confiao/models.py @@ -8,6 +8,9 @@ class Sale(models.Model): phone = models.CharField(max_length=13, null=True, blank=True) description = models.CharField(max_length=255, null=True, blank=True) + def __str__(self): + return f"{self.date} {self.customer}" + class SaleLine(models.Model): @@ -17,6 +20,9 @@ class SaleLine(models.Model): unit_price = models.DecimalField(max_digits=9, decimal_places=2) description = models.CharField(max_length=255, null=True, blank=True) + def __str__(self): + return f"{self.sale} - {self.product}" + class MeasuringUnits(models.TextChoices): UNIT = 'UNIT', _('Unit')