From 33eba8a4035330f8273c531474cb3aead3a479a9 Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby Date: Tue, 25 Feb 2020 14:15:36 +0100 Subject: [PATCH 1/2] add last_negative field to note --- apps/note/models/notes.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/note/models/notes.py b/apps/note/models/notes.py index 3d929bc8..62811735 100644 --- a/apps/note/models/notes.py +++ b/apps/note/models/notes.py @@ -27,6 +27,12 @@ class Note(PolymorphicModel): help_text=_('in centimes, money credited for this instance'), default=0, ) + last_negative= models.DateTimeField( + verbose_name=_('last negative date'), + help_text=_('last time the balance was negative'), + null=True, + blank=True, + ) is_active = models.BooleanField( _('active'), default=True, From 0cd0b11fa5e46b144a2b7b0bde1e6e7e2dbf0819 Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby Date: Tue, 25 Feb 2020 14:15:59 +0100 Subject: [PATCH 2/2] remove `name` Field of TemplateTransaction Redundant with `reason` from Transaction --- apps/note/models/transactions.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/note/models/transactions.py b/apps/note/models/transactions.py index c99b5538..49fc44b4 100644 --- a/apps/note/models/transactions.py +++ b/apps/note/models/transactions.py @@ -164,10 +164,6 @@ class TemplateTransaction(Transaction): TemplateCategory, on_delete=models.PROTECT, ) - name = models.CharField( - max_length=255, - ) - class MembershipTransaction(Transaction): """