23 lines
532 B
Python
23 lines
532 B
Python
from django.contrib import admin
|
|
|
|
from vbv_lernwelt.shop.models import CheckoutInformation
|
|
|
|
|
|
@admin.action(description="Create invoice for selected checkouts")
|
|
def generate_invoice(modeladmin, request, queryset):
|
|
pass
|
|
|
|
|
|
@admin.register(CheckoutInformation)
|
|
class CheckoutInformationAdmin(admin.ModelAdmin):
|
|
list_display = (
|
|
"product_sku",
|
|
"user",
|
|
"product_name",
|
|
"product_price",
|
|
"updated_at",
|
|
"state",
|
|
"invoice_transmitted_at",
|
|
)
|
|
actions = [generate_invoice]
|