fix history kpsul view
This commit is contained in:
parent
a98c6b233e
commit
e2c4214efc
1 changed files with 4 additions and 4 deletions
|
@ -1279,19 +1279,19 @@ def history_json(request):
|
|||
# Récupération des paramètres
|
||||
from_date = request.POST.get('from', None)
|
||||
to_date = request.POST.get('to', None)
|
||||
limit = request.POST.get('limit', None);
|
||||
limit = request.POST.get('limit', None)
|
||||
checkouts = request.POST.getlist('checkouts[]', None)
|
||||
accounts = request.POST.getlist('accounts[]', None)
|
||||
|
||||
# Construction de la requête (sur les opérations) pour le prefetch
|
||||
queryset_prefetch = Operation.objects.select_related(
|
||||
'canceled_by__trigramme', 'addcost_for__trigramme',
|
||||
'article__name')
|
||||
'canceled_by', 'addcost_for',
|
||||
'article')
|
||||
|
||||
# Construction de la requête principale
|
||||
opegroups = (OperationGroup.objects
|
||||
.prefetch_related(Prefetch('opes', queryset = queryset_prefetch))
|
||||
.select_related('on_acc__trigramme', 'valid_by__trigramme')
|
||||
.select_related('on_acc', 'valid_by')
|
||||
.order_by('at')
|
||||
)
|
||||
# Application des filtres
|
||||
|
|
Loading…
Reference in a new issue