Skip to content

Commit

Permalink
Add order position template to admin
Browse files Browse the repository at this point in the history
  • Loading branch information
bruecksen committed Nov 14, 2024
1 parent 347448a commit 64f5e93
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bakeup/shop/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,17 @@ class CustomerOrderAdmin(BaseAdmin):
)


class CustomerOrderTemplatePositionAdmin(admin.TabularInline):
class CustomerOrderTemplatePositionAdminInline(admin.TabularInline):
model = CustomerOrderTemplatePosition
extra = 0


@admin.register(CustomerOrderTemplate)
class CustomerOrderTemplateAdmin(BaseAdmin):
list_display = ("customer", "start_date", "end_date", "is_locked")
inlines = (CustomerOrderTemplatePositionAdmin,)
inlines = (CustomerOrderTemplatePositionAdminInline,)


@admin.register(CustomerOrderTemplatePosition)
class CustomerOrderTemplatePositionAdmin(BaseAdmin):
list_display = ("order_template", "product", "quantity", "created", "updated")

0 comments on commit 64f5e93

Please sign in to comment.