diff --git a/kfet/models.py b/kfet/models.py
index 419cd0a0..88626729 100644
--- a/kfet/models.py
+++ b/kfet/models.py
@@ -505,6 +505,10 @@ class OperationGroup(models.Model):
related_name = "+",
blank = True, null = True, default = None)
+ def __str__(self):
+ return ', '.join(map(str, self.opes.all()))
+
+
class Operation(models.Model):
PURCHASE = 'purchase'
DEPOSIT = 'deposit'
@@ -549,6 +553,18 @@ class Operation(models.Model):
max_digits = 6, decimal_places = 2,
blank = True, null = True, default = None)
+ def __str__(self):
+ templates = {
+ self.PURCHASE: "{nb} {article.name} ({amount}€)",
+ self.DEPOSIT: "charge ({amount})",
+ self.WITHDRAW: "retrait ({amount})",
+ self.INITIAL: "initial ({amount})",
+ }
+ return templates[self.type].format(nb=self.article_nb,
+ article=self.article,
+ amount=self.amount)
+
+
class GlobalPermissions(models.Model):
class Meta:
managed = False
diff --git a/kfet/static/kfet/css/index.css b/kfet/static/kfet/css/index.css
index 5b179de9..6821a4e4 100644
--- a/kfet/static/kfet/css/index.css
+++ b/kfet/static/kfet/css/index.css
@@ -364,3 +364,11 @@ textarea {
.help h4 {
margin:15px 0;
}
+
+/*
+ * Statistiques
+ */
+
+.stat-graph {
+ height: 100px;
+}
diff --git a/kfet/templates/kfet/account_read.html b/kfet/templates/kfet/account_read.html
index cfd2fbb2..4771b0ff 100644
--- a/kfet/templates/kfet/account_read.html
+++ b/kfet/templates/kfet/account_read.html
@@ -15,8 +15,11 @@