diff options
Diffstat (limited to 'servo/models')
-rw-r--r-- | servo/models/order.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/servo/models/order.py b/servo/models/order.py index 980ae54..344100d 100644 --- a/servo/models/order.py +++ b/servo/models/order.py @@ -55,6 +55,9 @@ class Order(models.Model): on_delete=models.SET_NULL ) + unit_received_at = models.DateTimeField(null=True) + customer_contacted_at = models.DateTimeField(null=True) + closed_at = models.DateTimeField(null=True) closed_by = models.ForeignKey( settings.AUTH_USER_MODEL, @@ -837,7 +840,7 @@ class Order(models.Model): def get_absolute_url(self): return reverse("orders-edit", args=[self.pk]) - def __unicode__(self): + def __str__(self): return self.code @@ -1025,7 +1028,7 @@ class ServiceOrderItem(AbstractOrderItem): def is_warranty(self): return self.price_category == 'warranty' - def __unicode__(self): + def __str__(self): return self.code class Meta: @@ -1118,7 +1121,7 @@ class OrderStatus(models.Model): statuses = self.order.orderstatus_set return statuses.filter(started_at__lt=self.started_at).order_by('id').last() - def __unicode__(self): + def __str__(self): return self.status.title class Meta: @@ -1167,7 +1170,7 @@ class Accessory(models.Model): device = models.ForeignKey(Device, on_delete=models.CASCADE) order = models.ForeignKey(Order, on_delete=models.CASCADE) - def __unicode__(self): + def __str__(self): return self.name class Meta: |