create Custom history table

This commit is contained in:
Pierre-antoine Comby 2019-08-15 23:08:15 +02:00
parent 6779b9dac2
commit a84031405e
2 changed files with 24 additions and 0 deletions

View file

@ -106,6 +106,10 @@ class Transaction(models.Model):
self.destination.save()
super().save(*args, **kwargs)
@property
def total(self):
return self.amount*self.quantity
class MembershipTransaction(Transaction):
membership = models.OneToOneField(