Implement non-destructive order updates

This commit is contained in:
fnux 2020-05-08 10:07:44 +02:00
commit d47c94ba84
3 changed files with 30 additions and 1 deletions

View file

@ -827,6 +827,7 @@ class Order(models.Model):
editable=False)
billing_address = models.ForeignKey(BillingAddress, on_delete=models.CASCADE)
description = models.TextField()
replaced_by = models.ForeignKey('self', on_delete=models.CASCADE, blank=True, null=True)
# TODO: enforce ending_date - starting_date to be larger than recurring_period.
creation_date = models.DateTimeField(auto_now_add=True)