mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
feat: generic returnable products
This commit is contained in:
@ -26,6 +26,7 @@ from counter.models import (
|
||||
Product,
|
||||
ProductType,
|
||||
Refilling,
|
||||
ReturnableProduct,
|
||||
Selling,
|
||||
)
|
||||
|
||||
@ -43,6 +44,18 @@ class ProductAdmin(SearchModelAdmin):
|
||||
search_fields = ("name", "code")
|
||||
|
||||
|
||||
@admin.register(ReturnableProduct)
|
||||
class ReturnableProductAdmin(admin.ModelAdmin):
|
||||
list_display = ("product", "returned_product", "max_return")
|
||||
search_fields = (
|
||||
"product__name",
|
||||
"product__code",
|
||||
"returned_product__name",
|
||||
"returned_product__code",
|
||||
)
|
||||
autocomplete_fields = ("product", "returned_product")
|
||||
|
||||
|
||||
@admin.register(Customer)
|
||||
class CustomerAdmin(SearchModelAdmin):
|
||||
list_display = ("user", "account_id", "amount")
|
||||
|
Reference in New Issue
Block a user