From 2425ecc8112fa05f8b3dbbfdfaf97499e19110fb Mon Sep 17 00:00:00 2001 From: Mono Mono Date: Sat, 6 Jul 2024 09:30:35 -0500 Subject: [PATCH] =?UTF-8?q?style:=20agregando=20descripci=C3=B3n=20a=20los?= =?UTF-8?q?=20modelos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tienda_ilusion/don_confiao/models.py | 6 ++++++ 1 file changed, 6 insertions(+) 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')