Исправлено поле created_at на reserved_at для Reservation
Проблема:
- У модели Reservation нет поля created_at
- Есть поле reserved_at для даты создания резерва
Исправление:
- В view изменена сортировка order_by('-reserved_at')
- В шаблоне изменено отображение даты res.reserved_at
This commit is contained in:
@@ -33,7 +33,7 @@ def debug_inventory_page(request):
|
||||
stocks = Stock.objects.select_related('product', 'warehouse').order_by('product__name')
|
||||
reservations = Reservation.objects.select_related(
|
||||
'product', 'warehouse', 'order_item__order'
|
||||
).order_by('-created_at')
|
||||
).order_by('-reserved_at')
|
||||
sales = Sale.objects.select_related('product', 'warehouse', 'order').order_by('-created_at')
|
||||
allocations = SaleBatchAllocation.objects.select_related(
|
||||
'sale__product', 'batch'
|
||||
|
||||
Reference in New Issue
Block a user