forked from erp-dev/erp
feat: added print_count api, added merchant setting model, added manual mode setting for purchase order
This commit is contained in:
@@ -81,12 +81,18 @@ class StockChangeDetailAdmin(admin.ModelAdmin):
|
||||
'product',
|
||||
'quantity',
|
||||
'direction',
|
||||
'consume_with',
|
||||
'consumer',
|
||||
'unit',
|
||||
)
|
||||
search_fields = ('stock_change_record__id', 'product__name')
|
||||
list_filter = ('stock_change_record', 'stock_change_record__type')
|
||||
list_filter = ('stock_change_record', 'stock_change_record__type', 'is_consumed')
|
||||
ordering = ('-created_at',)
|
||||
|
||||
@admin.display(description='消耗者')
|
||||
def consumer(self, obj: models.StockChangeDetail):
|
||||
return obj.consumed_by_detail
|
||||
|
||||
@admin.display(description='出入方向')
|
||||
def direction(self, obj):
|
||||
return '入库' if obj.stock_change_record.is_incoming else '出库'
|
||||
|
||||
Reference in New Issue
Block a user