Initial commit: Product Slip Manager
This commit is contained in:
17
slips/admin.py
Normal file
17
slips/admin.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from django.contrib import admin
|
||||
from .models import Product, Order
|
||||
|
||||
|
||||
@admin.register(Product)
|
||||
class ProductAdmin(admin.ModelAdmin):
|
||||
list_display = ['code', 'description', 'default_net_weight', 'created_at']
|
||||
search_fields = ['code', 'description']
|
||||
|
||||
|
||||
@admin.register(Order)
|
||||
class OrderAdmin(admin.ModelAdmin):
|
||||
list_display = ['id', 'product', 'batch_number', 'total_weight', 'canister_count',
|
||||
'box_count', 'status', 'created_at']
|
||||
list_filter = ['status', 'product']
|
||||
search_fields = ['batch_number', 'product__code']
|
||||
readonly_fields = ['canister_count', 'box_count', 'canister_pages', 'box_pages']
|
||||
Reference in New Issue
Block a user