add: add stock movemend models, api, admins

This commit is contained in:
behruz-dev
2025-08-28 11:55:12 +05:00
parent 86625b12e4
commit 4df87e90d5
11 changed files with 395 additions and 13 deletions

View File

@@ -1,8 +1,22 @@
from django.contrib import admin
from core.apps.wherehouse.models.stock_movemend import StockMovemend
from core.apps.wherehouse.models.stock_movemend import StockMovemend, StockMovmendProduct
class StockMovemendProductInline(admin.TabularInline):
model = StockMovmendProduct
extra = 0
def has_add_permission(self, request, obj):
return False
@admin.register(StockMovemend)
class StockMovemendAdmin(admin.ModelAdmin):
list_display = ['id','wherehouse_to', 'wherehouse_from', 'product', 'quantity', 'movemend_type']
list_display = ['id', 'wherehouse_to', 'wherehouse_from', 'movemend_type']
inlines = [StockMovemendProductInline]
@admin.register(StockMovmendProduct)
class StockMovemendProductAdmin(admin.ModelAdmin):
list_display = ['id', 'inventory', 'quantity']