mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-12-23 07:52:23 +00:00
[note] Added type property to transactions
This commit is contained in:
parent
5d15b8c613
commit
49952355e6
@ -157,6 +157,10 @@ class Transaction(PolymorphicModel):
|
||||
def total(self):
|
||||
return self.amount * self.quantity
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
return _('transfert')
|
||||
|
||||
|
||||
class TemplateTransaction(Transaction):
|
||||
"""
|
||||
@ -174,6 +178,10 @@ class TemplateTransaction(Transaction):
|
||||
on_delete=models.PROTECT,
|
||||
)
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
return _('template')
|
||||
|
||||
|
||||
class MembershipTransaction(Transaction):
|
||||
"""
|
||||
@ -190,3 +198,7 @@ class MembershipTransaction(Transaction):
|
||||
class Meta:
|
||||
verbose_name = _("membership transaction")
|
||||
verbose_name_plural = _("membership transactions")
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
return _('membership')
|
||||
|
Loading…
Reference in New Issue
Block a user