forked from DGNum/gestioCOF
add transfersonly option
This commit is contained in:
parent
3f35dc2c06
commit
a9e1cd01db
1 changed files with 3 additions and 0 deletions
|
@ -1317,6 +1317,7 @@ def history_json(request):
|
||||||
to_date = request.POST.get('to', None)
|
to_date = request.POST.get('to', None)
|
||||||
checkouts = request.POST.getlist('checkouts[]', None)
|
checkouts = request.POST.getlist('checkouts[]', None)
|
||||||
accounts = request.POST.getlist('accounts[]', None)
|
accounts = request.POST.getlist('accounts[]', None)
|
||||||
|
transfers_only = request.POST.get('transfersonly', None)
|
||||||
|
|
||||||
# Construction de la requête (sur les opérations) pour le prefetch
|
# Construction de la requête (sur les opérations) pour le prefetch
|
||||||
ope_queryset_prefetch = Operation.objects.select_related(
|
ope_queryset_prefetch = Operation.objects.select_related(
|
||||||
|
@ -1368,6 +1369,8 @@ def history_json(request):
|
||||||
if checkouts:
|
if checkouts:
|
||||||
opegroups = opegroups.filter(checkout_id__in=checkouts)
|
opegroups = opegroups.filter(checkout_id__in=checkouts)
|
||||||
transfergroups = TransferGroup.objects.none()
|
transfergroups = TransferGroup.objects.none()
|
||||||
|
if transfers_only:
|
||||||
|
opegroups = OperationGroup.objects.none()
|
||||||
if accounts:
|
if accounts:
|
||||||
opegroups = opegroups.filter(on_acc_id__in=accounts)
|
opegroups = opegroups.filter(on_acc_id__in=accounts)
|
||||||
# Un non-membre de l'équipe n'a que accès à son historique
|
# Un non-membre de l'équipe n'a que accès à son historique
|
||||||
|
|
Loading…
Reference in a new issue