mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Order list export: Expose same "extended status" as in backend (#3674)
* Order list export: Expose same "extended status" as in backend * Review notes
This commit is contained in:
@@ -325,6 +325,18 @@ class Order(LockModel, LoggedModel):
|
||||
def email_confirm_hash(self):
|
||||
return hashlib.sha256(settings.SECRET_KEY.encode() + self.secret.encode()).hexdigest()[:9]
|
||||
|
||||
def get_extended_status_display(self):
|
||||
# Changes in this method should to be replicated in pretixcontrol/orders/fragment_order_status.html
|
||||
# and pretixpresale/event/fragment_order_status.html
|
||||
if self.status == Order.STATUS_PENDING:
|
||||
if self.require_approval:
|
||||
return _("approval pending")
|
||||
elif self.valid_if_pending:
|
||||
return pgettext_lazy("order state", "pending (confirmed)")
|
||||
elif self.status == Order.STATUS_PAID and self.count_positions == 0:
|
||||
return _("canceled (paid fee)")
|
||||
return self.get_status_display()
|
||||
|
||||
@property
|
||||
def fees(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user