WIP: Aureplop/kpsul js refactor #501

Draft
delobell wants to merge 215 commits from aureplop/kpsul_js_refactor into master
Showing only changes of commit 100686457b - Show all commits

View file

@ -1472,15 +1472,13 @@ def history_json(request):
# 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(
'canceled_by__trigramme', 'addcost_for__trigramme', 'canceled_by', 'addcost_for',
'article__name') 'article')
ope_prefetch = Prefetch('opes', ope_prefetch = Prefetch('opes',
queryset=ope_queryset_prefetch) queryset=ope_queryset_prefetch)
transfer_queryset_prefetch = Transfer.objects.select_related( transfer_queryset_prefetch = Transfer.objects.select_related(
'from_acc__trigramme', 'to_acc__trigramme', 'from_acc', 'to_acc', 'canceled_by')
'from_acc__id', 'to_acc__id',
'canceled_by__trigramme')
if accounts: if accounts:
transfer_queryset_prefetch = transfer_queryset_prefetch.filter( transfer_queryset_prefetch = transfer_queryset_prefetch.filter(