diff --git a/core/apps/wherehouse/admin/stock_movement.py b/core/apps/wherehouse/admin/stock_movement.py index a66093b..1ad2cc1 100644 --- a/core/apps/wherehouse/admin/stock_movement.py +++ b/core/apps/wherehouse/admin/stock_movement.py @@ -13,8 +13,9 @@ class StockMovemendProductInline(admin.TabularInline): @admin.register(StockMovemend) class StockMovemendAdmin(admin.ModelAdmin): - list_display = ['id', 'wherehouse_to', 'wherehouse_from', 'movemend_type'] + list_display = ['id', "number", 'wherehouse_to', 'wherehouse_from', 'movemend_type'] inlines = [StockMovemendProductInline] + ordering = ('-number',) @admin.register(StockMovmendProduct) diff --git a/core/apps/wherehouse/signals/__init__.py b/core/apps/wherehouse/signals/__init__.py index e69de29..dac825b 100644 --- a/core/apps/wherehouse/signals/__init__.py +++ b/core/apps/wherehouse/signals/__init__.py @@ -0,0 +1 @@ +from .stock_movemend import * \ No newline at end of file diff --git a/core/apps/wherehouse/signals/stock_movemend.py b/core/apps/wherehouse/signals/stock_movemend.py index bcce1c6..f268e60 100644 --- a/core/apps/wherehouse/signals/stock_movemend.py +++ b/core/apps/wherehouse/signals/stock_movemend.py @@ -8,4 +8,4 @@ def set_stock_movemend_number(sender, instance, created, **kwargs): if created: last_party = StockMovemend.objects.order_by('number').last() instance.number = (last_party.number + 1) if last_party else 1 - instance.save(update_fields=["number"]) \ No newline at end of file + instance.save(update_fields=["number"]) \ No newline at end of file