1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-20 17:41:55 +02:00

Multiple select

This commit is contained in:
Yohann D'ANELLO
2020-03-11 22:51:46 +01:00
parent cebbe65eef
commit c4f54d9d5b
3 changed files with 59 additions and 27 deletions

View File

@ -132,6 +132,7 @@ class Transaction(PolymorphicModel):
if self.source.pk == self.destination.pk:
# When source == destination, no money is transfered
super().save(*args, **kwargs)
return
created = self.pk is None

View File

@ -18,7 +18,7 @@ class HistoryTable(tables.Table):
}
model = Transaction
exclude = ("polymorphic_ctype", )
order_by = ('-created_at', )
order_by = ('-id', )
template_name = 'django_tables2/bootstrap4.html'
sequence = ('...', 'total', 'valid')