Use a proxy for special transactions in treasury app for modularity (not a clean way, but without any other solution...)
This commit is contained in:
parent
5fd472d408
commit
884a7d0f08
3 changed files with 24 additions and 14 deletions
|
|
@ -6,7 +6,6 @@ from django.urls import reverse
|
|||
from django.utils import timezone
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from polymorphic.models import PolymorphicModel
|
||||
from treasury.models import Remittance
|
||||
|
||||
from .notes import Note, NoteClub, NoteSpecial
|
||||
|
||||
|
|
@ -210,13 +209,6 @@ class SpecialTransaction(Transaction):
|
|||
blank=True,
|
||||
)
|
||||
|
||||
remittance = models.ForeignKey(
|
||||
Remittance,
|
||||
on_delete=models.PROTECT,
|
||||
null=True,
|
||||
verbose_name=_("Remittance"),
|
||||
)
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
return _('Credit') if isinstance(self.source, NoteSpecial) else _("Debit")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue