1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

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(