Changes to payment models #32

Merged
valberg merged 35 commits from benjaoming/membersystem:payment-updates into main 2024-08-03 17:55:33 +00:00
2 changed files with 2 additions and 7 deletions
Showing only changes of commit d9de265de9 - Show all commits

View file

@ -43,12 +43,7 @@ class OrderAdmin(admin.ModelAdmin):
inlines = (OrderProductInline,)
form = OrderAdminForm
list_display = ("who", "description", "created", "is_paid")
@admin.display(description=_("Customer"))
def who(self, instance: models.Order) -> str:
"""Return the full name of the user who made the order."""
return instance.member.get_full_name()
list_display = ("member", "description", "created", "is_paid")
@admin.register(models.Payment)

View file

@ -32,7 +32,7 @@ class Account(CreatedModifiedAbstract):
owner = models.ForeignKey("membership.Member", on_delete=models.PROTECT)
def __str__(self) -> str:
return f"Account of {self.owner.get_full_name()}"
return f"Account of {self.owner}"
@property
def balance(self) -> Money: