feat: add software subscription orders
This commit is contained in:
@@ -16,6 +16,7 @@ from .models import (
|
||||
LegacyMigrationGrant,
|
||||
MigrationRequest,
|
||||
SoftwareEntitlement,
|
||||
SoftwareOrder,
|
||||
SoftwarePlan,
|
||||
)
|
||||
from .services import (
|
||||
@@ -422,3 +423,22 @@ class DeviceCredentialAdmin(ReadOnlyLicenseAdmin):
|
||||
list_filter = ("product_code", "revoked_at", "expires_at")
|
||||
search_fields = ("token_prefix", "user__username", "user__email")
|
||||
list_select_related = ("user", "device", "entitlement", "seat")
|
||||
|
||||
|
||||
@admin.register(SoftwareOrder)
|
||||
class SoftwareOrderAdmin(ReadOnlyLicenseAdmin):
|
||||
list_display = (
|
||||
"created_at",
|
||||
"order_no",
|
||||
"user",
|
||||
"plan_name",
|
||||
"amount_money",
|
||||
"pay_method",
|
||||
"status",
|
||||
"payment_txn_no",
|
||||
"entitlement",
|
||||
"fulfilled_at",
|
||||
)
|
||||
list_filter = ("product_code", "pay_method", "status", "created_at")
|
||||
search_fields = ("=order_no", "=payment_txn_no", "user__username", "user__email")
|
||||
list_select_related = ("user", "source_plan", "entitlement", "fulfillment_event")
|
||||
|
||||
Reference in New Issue
Block a user