You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
795 B
22 lines
795 B
2 days ago
|
from django.contrib import admin
|
||
|
from .models import Warehouse, StorageLocation, StockOperation
|
||
|
|
||
|
@admin.register(Warehouse)
|
||
|
class WarehouseAdmin(admin.ModelAdmin):
|
||
|
list_display = ('name', 'location', 'is_active')
|
||
|
search_fields = ('name', 'location')
|
||
|
|
||
|
|
||
|
@admin.register(StorageLocation)
|
||
|
class StorageLocationAdmin(admin.ModelAdmin):
|
||
|
list_display = ('name', 'warehouse', 'temperature_control')
|
||
|
search_fields = ('name', 'warehouse__name')
|
||
|
list_filter = ('temperature_control',)
|
||
|
|
||
|
|
||
|
@admin.register(StockOperation)
|
||
|
class StockOperationAdmin(admin.ModelAdmin):
|
||
|
list_display = ('product', 'warehouse', 'operation_type', 'quantity', 'operation_date')
|
||
|
search_fields = ('product__name', 'warehouse__name', 'operation_type')
|
||
|
list_filter = ('operation_type', 'operation_date')
|