Merge branch 'no_money_created' into 'master'

Fix #25

Closes #25

See merge request bde/nk20!27
This commit is contained in:
Pierre-antoine Comby 2020-02-27 19:52:30 +01:00
commit c372b6587e
7 changed files with 183 additions and 114 deletions

View File

@ -3,6 +3,7 @@
from dal import autocomplete from dal import autocomplete
from django import forms from django import forms
from django.utils.translation import gettext_lazy as _
from .models import Transaction, TransactionTemplate, TemplateTransaction from .models import Transaction, TransactionTemplate, TemplateTransaction
@ -33,6 +34,23 @@ class TransactionForm(forms.ModelForm):
def save(self, commit=True): def save(self, commit=True):
super().save(commit) super().save(commit)
def clean(self):
"""
If the user has no right to transfer funds, then it will be the source of the transfer by default.
Transactions between a note and the same note are not authorized.
"""
cleaned_data = super().clean()
if not "source" in cleaned_data: # TODO Replace it with "if %user has no right to transfer funds"
cleaned_data["source"] = self.user.note
if cleaned_data["source"].pk == cleaned_data["destination"].pk:
self.add_error("destination", _("Source and destination must be different."))
return cleaned_data
class Meta: class Meta:
model = Transaction model = Transaction
fields = ( fields = (

View File

@ -84,8 +84,6 @@ class Transaction(PolymorphicModel):
amount is store in centimes of currency, making it a positive integer amount is store in centimes of currency, making it a positive integer
value. (from someone to someone else) value. (from someone to someone else)
TODO: Ensure source != destination.
""" """
source = models.ForeignKey( source = models.ForeignKey(
@ -126,6 +124,11 @@ class Transaction(PolymorphicModel):
""" """
When saving, also transfer money between two notes When saving, also transfer money between two notes
""" """
if self.source.pk == self.destination.pk:
# When source == destination, no money is transfered
return
created = self.pk is None created = self.pk is None
to_transfer = self.amount * self.quantity to_transfer = self.amount * self.quantity
if not created: if not created:

View File

@ -41,17 +41,12 @@ class TransactionCreate(LoginRequiredMixin, CreateView):
if False: # TODO: fix it with "if %user has no right to transfer funds" if False: # TODO: fix it with "if %user has no right to transfer funds"
del form.fields['source'] del form.fields['source']
form.user = self.request.user
return form return form
def form_valid(self, form): def get_success_url(self):
""" return reverse('note:transfer')
If the user has no right to transfer funds, then it will be the source of the transfer by default.
"""
if False: # TODO: fix it with "if %user has no right to transfer funds"
form.instance.source = self.request.user.note
return super().form_valid(form)
class NoteAutocomplete(autocomplete.Select2QuerySetView): class NoteAutocomplete(autocomplete.Select2QuerySetView):

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-21 13:50+0100\n" "POT-Creation-Date: 2020-02-27 17:39+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -24,8 +24,8 @@ msgstr ""
#: apps/activity/models.py:19 apps/activity/models.py:44 #: apps/activity/models.py:19 apps/activity/models.py:44
#: apps/member/models.py:60 apps/member/models.py:111 #: apps/member/models.py:60 apps/member/models.py:111
#: apps/note/models/notes.py:176 apps/note/models/transactions.py:23 #: apps/note/models/notes.py:184 apps/note/models/transactions.py:24
#: apps/note/models/transactions.py:43 templates/member/profile_detail.html:11 #: apps/note/models/transactions.py:44 templates/member/profile_detail.html:11
msgid "name" msgid "name"
msgstr "" msgstr ""
@ -45,12 +45,12 @@ msgstr ""
msgid "activity types" msgid "activity types"
msgstr "" msgstr ""
#: apps/activity/models.py:48 #: apps/activity/models.py:48 apps/note/models/transactions.py:69
msgid "description" msgid "description"
msgstr "" msgstr ""
#: apps/activity/models.py:54 apps/note/models/notes.py:152 #: apps/activity/models.py:54 apps/note/models/notes.py:160
#: apps/note/models/transactions.py:60 apps/note/models/transactions.py:104 #: apps/note/models/transactions.py:62
msgid "type" msgid "type"
msgstr "" msgstr ""
@ -144,7 +144,7 @@ msgid ""
"members can renew their membership." "members can renew their membership."
msgstr "" msgstr ""
#: apps/member/models.py:93 apps/note/models/notes.py:127 #: apps/member/models.py:93 apps/note/models/notes.py:135
msgid "club" msgid "club"
msgstr "" msgstr ""
@ -184,28 +184,32 @@ msgstr ""
msgid "Update Profile" msgid "Update Profile"
msgstr "" msgstr ""
#: apps/member/views.py:79 apps/note/models/notes.py:229 #: apps/member/views.py:79
msgid "An alias with a similar name already exists." msgid "An alias with a similar name already exists."
msgstr "" msgstr ""
#: apps/member/views.py:129 #: apps/member/views.py:130
#, python-format #, python-format
msgid "Account #%(id)s: %(username)s" msgid "Account #%(id)s: %(username)s"
msgstr "" msgstr ""
#: apps/note/admin.py:118 apps/note/models/transactions.py:86 #: apps/note/admin.py:120 apps/note/models/transactions.py:93
msgid "source" msgid "source"
msgstr "" msgstr ""
#: apps/note/admin.py:126 apps/note/admin.py:154 #: apps/note/admin.py:128 apps/note/admin.py:156
#: apps/note/models/transactions.py:51 apps/note/models/transactions.py:92 #: apps/note/models/transactions.py:53 apps/note/models/transactions.py:99
msgid "destination" msgid "destination"
msgstr "" msgstr ""
#: apps/note/apps.py:14 apps/note/models/notes.py:48 #: apps/note/apps.py:14 apps/note/models/notes.py:54
msgid "note" msgid "note"
msgstr "" msgstr ""
#: apps/note/forms.py:49
msgid "Source and destination must be different."
msgstr ""
#: apps/note/models/notes.py:26 #: apps/note/models/notes.py:26
msgid "account balance" msgid "account balance"
msgstr "" msgstr ""
@ -215,142 +219,158 @@ msgid "in centimes, money credited for this instance"
msgstr "" msgstr ""
#: apps/note/models/notes.py:31 #: apps/note/models/notes.py:31
msgid "last negative date"
msgstr ""
#: apps/note/models/notes.py:32
msgid "last time the balance was negative"
msgstr ""
#: apps/note/models/notes.py:37
msgid "active" msgid "active"
msgstr "" msgstr ""
#: apps/note/models/notes.py:34 #: apps/note/models/notes.py:40
msgid "" msgid ""
"Designates whether this note should be treated as active. Unselect this " "Designates whether this note should be treated as active. Unselect this "
"instead of deleting notes." "instead of deleting notes."
msgstr "" msgstr ""
#: apps/note/models/notes.py:38 #: apps/note/models/notes.py:44
msgid "display image" msgid "display image"
msgstr "" msgstr ""
#: apps/note/models/notes.py:43 apps/note/models/transactions.py:95 #: apps/note/models/notes.py:49 apps/note/models/transactions.py:102
msgid "created at" msgid "created at"
msgstr "" msgstr ""
#: apps/note/models/notes.py:49 #: apps/note/models/notes.py:55
msgid "notes" msgid "notes"
msgstr "" msgstr ""
#: apps/note/models/notes.py:57 #: apps/note/models/notes.py:63
msgid "Note" msgid "Note"
msgstr "" msgstr ""
#: apps/note/models/notes.py:67 apps/note/models/notes.py:90 #: apps/note/models/notes.py:73 apps/note/models/notes.py:97
msgid "This alias is already taken." msgid "This alias is already taken."
msgstr "" msgstr ""
#: apps/note/models/notes.py:105 #: apps/note/models/notes.py:113
msgid "user" msgid "user"
msgstr "" msgstr ""
#: apps/note/models/notes.py:109 #: apps/note/models/notes.py:117
msgid "one's note" msgid "one's note"
msgstr "" msgstr ""
#: apps/note/models/notes.py:110 #: apps/note/models/notes.py:118
msgid "users note" msgid "users note"
msgstr "" msgstr ""
#: apps/note/models/notes.py:116 #: apps/note/models/notes.py:124
#, python-format #, python-format
msgid "%(user)s's note" msgid "%(user)s's note"
msgstr "" msgstr ""
#: apps/note/models/notes.py:131 #: apps/note/models/notes.py:139
msgid "club note" msgid "club note"
msgstr "" msgstr ""
#: apps/note/models/notes.py:132 #: apps/note/models/notes.py:140
msgid "clubs notes" msgid "clubs notes"
msgstr "" msgstr ""
#: apps/note/models/notes.py:138 #: apps/note/models/notes.py:146
#, python-format #, python-format
msgid "Note of %(club)s club" msgid "Note of %(club)s club"
msgstr "" msgstr ""
#: apps/note/models/notes.py:158 #: apps/note/models/notes.py:166
msgid "special note" msgid "special note"
msgstr "" msgstr ""
#: apps/note/models/notes.py:159 #: apps/note/models/notes.py:167
msgid "special notes" msgid "special notes"
msgstr "" msgstr ""
#: apps/note/models/notes.py:182 #: apps/note/models/notes.py:190
msgid "Invalid alias" msgid "Invalid alias"
msgstr "" msgstr ""
#: apps/note/models/notes.py:198 #: apps/note/models/notes.py:206
msgid "alias" msgid "alias"
msgstr "" msgstr ""
#: apps/note/models/notes.py:199 templates/member/profile_detail.html:33 #: apps/note/models/notes.py:207 templates/member/profile_detail.html:33
msgid "aliases" msgid "aliases"
msgstr "" msgstr ""
#: apps/note/models/notes.py:225 #: apps/note/models/notes.py:233
msgid "Alias too long." msgid "Alias is too long."
msgstr "" msgstr ""
#: apps/note/models/notes.py:236 #: apps/note/models/notes.py:238
msgid "An alias with a similar name already exists:"
msgstr ""
#: apps/note/models/notes.py:246
msgid "You can't delete your main alias." msgid "You can't delete your main alias."
msgstr "" msgstr ""
#: apps/note/models/transactions.py:29 #: apps/note/models/transactions.py:30
msgid "transaction category" msgid "transaction category"
msgstr "" msgstr ""
#: apps/note/models/transactions.py:30 #: apps/note/models/transactions.py:31
msgid "transaction categories" msgid "transaction categories"
msgstr "" msgstr ""
#: apps/note/models/transactions.py:54 apps/note/models/transactions.py:102 #: apps/note/models/transactions.py:47
msgid "A template with this name already exist"
msgstr ""
#: apps/note/models/transactions.py:56 apps/note/models/transactions.py:109
msgid "amount" msgid "amount"
msgstr "" msgstr ""
#: apps/note/models/transactions.py:55 #: apps/note/models/transactions.py:57
msgid "in centimes" msgid "in centimes"
msgstr "" msgstr ""
#: apps/note/models/transactions.py:65 #: apps/note/models/transactions.py:74
msgid "transaction template" msgid "transaction template"
msgstr "" msgstr ""
#: apps/note/models/transactions.py:66 #: apps/note/models/transactions.py:75
msgid "transaction templates" msgid "transaction templates"
msgstr "" msgstr ""
#: apps/note/models/transactions.py:99 #: apps/note/models/transactions.py:106
msgid "quantity" msgid "quantity"
msgstr "" msgstr ""
#: apps/note/models/transactions.py:108 #: apps/note/models/transactions.py:111
msgid "reason" msgid "reason"
msgstr "" msgstr ""
#: apps/note/models/transactions.py:112 #: apps/note/models/transactions.py:115
msgid "valid" msgid "valid"
msgstr "" msgstr ""
#: apps/note/models/transactions.py:117 #: apps/note/models/transactions.py:120
msgid "transaction" msgid "transaction"
msgstr "" msgstr ""
#: apps/note/models/transactions.py:118 #: apps/note/models/transactions.py:121
msgid "transactions" msgid "transactions"
msgstr "" msgstr ""
#: apps/note/models/transactions.py:160 #: apps/note/models/transactions.py:184
msgid "membership transaction" msgid "membership transaction"
msgstr "" msgstr ""
#: apps/note/models/transactions.py:161 #: apps/note/models/transactions.py:185
msgid "membership transactions" msgid "membership transactions"
msgstr "" msgstr ""
@ -358,15 +378,19 @@ msgstr ""
msgid "Transfer money from your account to one or others" msgid "Transfer money from your account to one or others"
msgstr "" msgstr ""
#: note_kfet/settings/base.py:148 #: apps/note/views.py:138
msgid "Consommations"
msgstr ""
#: note_kfet/settings/base.py:155
msgid "German" msgid "German"
msgstr "" msgstr ""
#: note_kfet/settings/base.py:149 #: note_kfet/settings/base.py:156
msgid "English" msgid "English"
msgstr "" msgstr ""
#: note_kfet/settings/base.py:150 #: note_kfet/settings/base.py:157
msgid "French" msgid "French"
msgstr "" msgstr ""

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-21 13:50+0100\n" "POT-Creation-Date: 2020-02-27 17:39+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -19,8 +19,8 @@ msgstr "activité"
#: apps/activity/models.py:19 apps/activity/models.py:44 #: apps/activity/models.py:19 apps/activity/models.py:44
#: apps/member/models.py:60 apps/member/models.py:111 #: apps/member/models.py:60 apps/member/models.py:111
#: apps/note/models/notes.py:176 apps/note/models/transactions.py:23 #: apps/note/models/notes.py:184 apps/note/models/transactions.py:24
#: apps/note/models/transactions.py:43 templates/member/profile_detail.html:11 #: apps/note/models/transactions.py:44 templates/member/profile_detail.html:11
msgid "name" msgid "name"
msgstr "nom" msgstr "nom"
@ -40,12 +40,12 @@ msgstr "type d'activité"
msgid "activity types" msgid "activity types"
msgstr "types d'activité" msgstr "types d'activité"
#: apps/activity/models.py:48 #: apps/activity/models.py:48 apps/note/models/transactions.py:69
msgid "description" msgid "description"
msgstr "description" msgstr "description"
#: apps/activity/models.py:54 apps/note/models/notes.py:152 #: apps/activity/models.py:54 apps/note/models/notes.py:160
#: apps/note/models/transactions.py:60 apps/note/models/transactions.py:104 #: apps/note/models/transactions.py:62
msgid "type" msgid "type"
msgstr "type" msgstr "type"
@ -143,7 +143,7 @@ msgstr ""
"Combien de temps l'adhésion peut durer après le 1er Janvier de l'année " "Combien de temps l'adhésion peut durer après le 1er Janvier de l'année "
"suivante avant que les adhérents peuvent renouveler leur adhésion." "suivante avant que les adhérents peuvent renouveler leur adhésion."
#: apps/member/models.py:93 apps/note/models/notes.py:127 #: apps/member/models.py:93 apps/note/models/notes.py:135
msgid "club" msgid "club"
msgstr "club" msgstr "club"
@ -183,28 +183,32 @@ msgstr "adhésions"
msgid "Update Profile" msgid "Update Profile"
msgstr "Modifier le profil" msgstr "Modifier le profil"
#: apps/member/views.py:79 apps/note/models/notes.py:229 #: apps/member/views.py:79
msgid "An alias with a similar name already exists." msgid "An alias with a similar name already exists."
msgstr "Un alias avec un nom similaire existe déjà." msgstr "Un alias avec un nom similaire existe déjà."
#: apps/member/views.py:129 #: apps/member/views.py:130
#, python-format #, python-format
msgid "Account #%(id)s: %(username)s" msgid "Account #%(id)s: %(username)s"
msgstr "Compte n°%(id)s : %(username)s" msgstr "Compte n°%(id)s : %(username)s"
#: apps/note/admin.py:118 apps/note/models/transactions.py:86 #: apps/note/admin.py:120 apps/note/models/transactions.py:93
msgid "source" msgid "source"
msgstr "source" msgstr "source"
#: apps/note/admin.py:126 apps/note/admin.py:154 #: apps/note/admin.py:128 apps/note/admin.py:156
#: apps/note/models/transactions.py:51 apps/note/models/transactions.py:92 #: apps/note/models/transactions.py:53 apps/note/models/transactions.py:99
msgid "destination" msgid "destination"
msgstr "destination" msgstr "destination"
#: apps/note/apps.py:14 apps/note/models/notes.py:48 #: apps/note/apps.py:14 apps/note/models/notes.py:54
msgid "note" msgid "note"
msgstr "note" msgstr "note"
#: apps/note/forms.py:49
msgid "Source and destination must be different."
msgstr "La source et la destination doivent être différentes."
#: apps/note/models/notes.py:26 #: apps/note/models/notes.py:26
msgid "account balance" msgid "account balance"
msgstr "solde du compte" msgstr "solde du compte"
@ -214,143 +218,160 @@ msgid "in centimes, money credited for this instance"
msgstr "en centimes, argent crédité pour cette instance" msgstr "en centimes, argent crédité pour cette instance"
#: apps/note/models/notes.py:31 #: apps/note/models/notes.py:31
msgid "last negative date"
msgstr "dernier date de négatif"
#: apps/note/models/notes.py:32
msgid "last time the balance was negative"
msgstr "dernier instant où la note était en négatif"
#: apps/note/models/notes.py:37
msgid "active" msgid "active"
msgstr "actif" msgstr "actif"
#: apps/note/models/notes.py:34 #: apps/note/models/notes.py:40
msgid "" msgid ""
"Designates whether this note should be treated as active. Unselect this " "Designates whether this note should be treated as active. Unselect this "
"instead of deleting notes." "instead of deleting notes."
msgstr "" msgstr ""
"Indique si la note est active. Désactiver cela plutôt que supprimer la note." "Indique si la note est active. Désactiver cela plutôt que supprimer la note."
#: apps/note/models/notes.py:38 #: apps/note/models/notes.py:44
msgid "display image" msgid "display image"
msgstr "image affichée" msgstr "image affichée"
#: apps/note/models/notes.py:43 apps/note/models/transactions.py:95 #: apps/note/models/notes.py:49 apps/note/models/transactions.py:102
msgid "created at" msgid "created at"
msgstr "créée le" msgstr "créée le"
#: apps/note/models/notes.py:49 #: apps/note/models/notes.py:55
msgid "notes" msgid "notes"
msgstr "notes" msgstr "notes"
#: apps/note/models/notes.py:57 #: apps/note/models/notes.py:63
msgid "Note" msgid "Note"
msgstr "Note" msgstr "Note"
#: apps/note/models/notes.py:67 apps/note/models/notes.py:90 #: apps/note/models/notes.py:73 apps/note/models/notes.py:97
msgid "This alias is already taken." msgid "This alias is already taken."
msgstr "Cet alias est déjà pris." msgstr "Cet alias est déjà pris."
#: apps/note/models/notes.py:105 #: apps/note/models/notes.py:113
msgid "user" msgid "user"
msgstr "utilisateur" msgstr "utilisateur"
#: apps/note/models/notes.py:109 #: apps/note/models/notes.py:117
msgid "one's note" msgid "one's note"
msgstr "note d'un utilisateur" msgstr "note d'un utilisateur"
#: apps/note/models/notes.py:110 #: apps/note/models/notes.py:118
msgid "users note" msgid "users note"
msgstr "notes des utilisateurs" msgstr "notes des utilisateurs"
#: apps/note/models/notes.py:116 #: apps/note/models/notes.py:124
#, python-format #, python-format
msgid "%(user)s's note" msgid "%(user)s's note"
msgstr "Note de %(user)s" msgstr "Note de %(user)s"
#: apps/note/models/notes.py:131 #: apps/note/models/notes.py:139
msgid "club note" msgid "club note"
msgstr "note d'un club" msgstr "note d'un club"
#: apps/note/models/notes.py:132 #: apps/note/models/notes.py:140
msgid "clubs notes" msgid "clubs notes"
msgstr "notes des clubs" msgstr "notes des clubs"
#: apps/note/models/notes.py:138 #: apps/note/models/notes.py:146
#, python-format #, python-format
msgid "Note of %(club)s club" msgid "Note of %(club)s club"
msgstr "Note du club %(club)s" msgstr "Note du club %(club)s"
#: apps/note/models/notes.py:158 #: apps/note/models/notes.py:166
msgid "special note" msgid "special note"
msgstr "note spéciale" msgstr "note spéciale"
#: apps/note/models/notes.py:159 #: apps/note/models/notes.py:167
msgid "special notes" msgid "special notes"
msgstr "notes spéciales" msgstr "notes spéciales"
#: apps/note/models/notes.py:182 #: apps/note/models/notes.py:190
msgid "Invalid alias" msgid "Invalid alias"
msgstr "Alias invalide" msgstr "Alias invalide"
#: apps/note/models/notes.py:198 #: apps/note/models/notes.py:206
msgid "alias" msgid "alias"
msgstr "alias" msgstr "alias"
#: apps/note/models/notes.py:199 templates/member/profile_detail.html:33 #: apps/note/models/notes.py:207 templates/member/profile_detail.html:33
msgid "aliases" msgid "aliases"
msgstr "alias" msgstr "alias"
#: apps/note/models/notes.py:225 #: apps/note/models/notes.py:233
msgid "Alias too long." msgid "Alias is too long."
msgstr "L'alias est trop long." msgstr "L'alias est trop long."
#: apps/note/models/notes.py:236 #: apps/note/models/notes.py:238
msgid "An alias with a similar name already exists:"
msgstr "Un alias avec un nom similaire existe déjà."
#: apps/note/models/notes.py:246
msgid "You can't delete your main alias." msgid "You can't delete your main alias."
msgstr "Vous ne pouvez pas supprimer votre alias principal." msgstr "Vous ne pouvez pas supprimer votre alias principal."
#: apps/note/models/transactions.py:29 #: apps/note/models/transactions.py:30
msgid "transaction category" msgid "transaction category"
msgstr "catégorie de transaction" msgstr "catégorie de transaction"
#: apps/note/models/transactions.py:30 #: apps/note/models/transactions.py:31
msgid "transaction categories" msgid "transaction categories"
msgstr "catégories de transaction" msgstr "catégories de transaction"
#: apps/note/models/transactions.py:54 apps/note/models/transactions.py:102 #: apps/note/models/transactions.py:47
#, fuzzy
msgid "A template with this name already exist"
msgstr "Un modèle de transaction avec un nom similaire existe déjà."
#: apps/note/models/transactions.py:56 apps/note/models/transactions.py:109
msgid "amount" msgid "amount"
msgstr "montant" msgstr "montant"
#: apps/note/models/transactions.py:55 #: apps/note/models/transactions.py:57
msgid "in centimes" msgid "in centimes"
msgstr "en centimes" msgstr "en centimes"
#: apps/note/models/transactions.py:65 #: apps/note/models/transactions.py:74
msgid "transaction template" msgid "transaction template"
msgstr "modèle de transaction" msgstr "modèle de transaction"
#: apps/note/models/transactions.py:66 #: apps/note/models/transactions.py:75
msgid "transaction templates" msgid "transaction templates"
msgstr "modèles de transaction" msgstr "modèles de transaction"
#: apps/note/models/transactions.py:99 #: apps/note/models/transactions.py:106
msgid "quantity" msgid "quantity"
msgstr "quantité" msgstr "quantité"
#: apps/note/models/transactions.py:108 #: apps/note/models/transactions.py:111
msgid "reason" msgid "reason"
msgstr "raison" msgstr "raison"
#: apps/note/models/transactions.py:112 #: apps/note/models/transactions.py:115
msgid "valid" msgid "valid"
msgstr "valide" msgstr "valide"
#: apps/note/models/transactions.py:117 #: apps/note/models/transactions.py:120
msgid "transaction" msgid "transaction"
msgstr "transaction" msgstr "transaction"
#: apps/note/models/transactions.py:118 #: apps/note/models/transactions.py:121
msgid "transactions" msgid "transactions"
msgstr "transactions" msgstr "transactions"
#: apps/note/models/transactions.py:160 #: apps/note/models/transactions.py:184
msgid "membership transaction" msgid "membership transaction"
msgstr "transaction d'adhésion" msgstr "transaction d'adhésion"
#: apps/note/models/transactions.py:161 #: apps/note/models/transactions.py:185
msgid "membership transactions" msgid "membership transactions"
msgstr "transactions d'adhésion" msgstr "transactions d'adhésion"
@ -358,15 +379,19 @@ msgstr "transactions d'adhésion"
msgid "Transfer money from your account to one or others" msgid "Transfer money from your account to one or others"
msgstr "Transfert d'argent de ton compte vers un ou plusieurs autres" msgstr "Transfert d'argent de ton compte vers un ou plusieurs autres"
#: note_kfet/settings/base.py:148 #: apps/note/views.py:138
msgid "Consommations"
msgstr "transactions"
#: note_kfet/settings/base.py:155
msgid "German" msgid "German"
msgstr "" msgstr ""
#: note_kfet/settings/base.py:149 #: note_kfet/settings/base.py:156
msgid "English" msgid "English"
msgstr "" msgstr ""
#: note_kfet/settings/base.py:150 #: note_kfet/settings/base.py:157
msgid "French" msgid "French"
msgstr "" msgstr ""
@ -408,13 +433,13 @@ msgstr ""
#: templates/member/profile_detail.html:14 #: templates/member/profile_detail.html:14
msgid "username" msgid "username"
msgstr "nom d'utilisateur" msgstr ""
#: templates/member/profile_detail.html:17 #: templates/member/profile_detail.html:17
#, fuzzy #, fuzzy
#| msgid "Change password" #| msgid "Change password"
msgid "password" msgid "password"
msgstr "Changer le mot de passe" msgstr ""
#: templates/member/profile_detail.html:20 #: templates/member/profile_detail.html:20
msgid "Change password" msgid "Change password"
@ -424,6 +449,10 @@ msgstr "Changer le mot de passe"
msgid "Manage auth token" msgid "Manage auth token"
msgstr "Gérer les jetons d'authentification" msgstr "Gérer les jetons d'authentification"
#: templates/member/profile_detail.html:51
msgid "Transaction history"
msgstr "Historique des transactions"
#: templates/member/profile_detail.html:54 #: templates/member/profile_detail.html:54
msgid "View my memberships" msgid "View my memberships"
msgstr "Voir mes adhésions" msgstr "Voir mes adhésions"

View File

@ -48,7 +48,7 @@
<div class="card-header" id="headingTwo"> <div class="card-header" id="headingTwo">
<h5 class="mb-0"> <h5 class="mb-0">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> <button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
<i class="fa fa-euro"></i> Historique des transactions <i class="fa fa-euro"></i> {% trans "Transaction history" %}
</button> </button>
</h5> </h5>
</div> </div>

View File

@ -64,7 +64,7 @@
<a class="btn btn-link stretched-link collapsed font-weight-bold" <a class="btn btn-link stretched-link collapsed font-weight-bold"
data-toggle="collapse" data-target="#historyListCollapse" data-toggle="collapse" data-target="#historyListCollapse"
aria-expanded="false" aria-controls="historyListCollapse"> aria-expanded="false" aria-controls="historyListCollapse">
<i class="fa fa-euro"></i> Historique des transactions <i class="fa fa-euro"></i> {% trans "Transaction history" %}
</a> </a>
</div> </div>
<div id="historyListCollapse" class="collapse" style="overflow:auto hidden" aria-labelledby="historyListHeading" data-parent="#accordionProfile"> <div id="historyListCollapse" class="collapse" style="overflow:auto hidden" aria-labelledby="historyListHeading" data-parent="#accordionProfile">