parent
ee2ef48b96
commit
d9de265de9
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue