Skip to content
Snippets Groups Projects
Commit 49952355 authored by Benjamin Graillot's avatar Benjamin Graillot Committed by Maxime Bombar
Browse files

[note] Added type property to transactions

parent 5d15b8c6
No related branches found
No related tags found
1 merge request!57Page de consommations
......@@ -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')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment