Formulaires pour nettoyage

This commit is contained in:
Ludovic Stephan 2020-09-16 17:16:14 +02:00
parent 569ce0ba25
commit 46f447ec5d

View file

@ -23,6 +23,7 @@ from kfet.models import (
Transfer,
TransferGroup,
)
from kfet.statistic import SCALE_CLASS_CHOICES
from . import KFET_DELETED_TRIGRAMME
from .auth import KFET_GENERIC_TRIGRAMME
@ -587,3 +588,28 @@ class OrderArticleToInventoryForm(forms.Form):
self.category = kwargs["initial"]["category"]
self.category_name = kwargs["initial"]["category__name"]
self.quantity_ordered = kwargs["initial"]["quantity_ordered"]
# ----
# Formulaires pour les statistiques K-Fêt
# ----
class StatScaleForm(forms.Form):
"""Formulaire pour nettoyer les paramètres envoyés aux
vues de statistiques K-Fêt. Non destiné à être affiché.
"""
name = forms.ChoiceField(choices=SCALE_CLASS_CHOICES)
begin = forms.DateTimeField(required=False)
end = forms.DateTimeField(required=False)
n_steps = forms.IntegerField(required=False)
last = forms.BooleanField(required=False)
class AccountStatForm(forms.Form):
""" Idem, mais pour la balance d'un compte """
begin_date = forms.DateTimeField(required=False)
end_date = forms.DateTimeField(required=False)
last_days = forms.IntegerField(required=False)