From 325da79e45e468aea77b16a8404387fbb07002c0 Mon Sep 17 00:00:00 2001 From: Skia Date: Mon, 29 Aug 2016 03:02:13 +0200 Subject: [PATCH] Add support for subscription typed products in eboutic --- .gitignore | 1 + core/management/commands/populate.py | 5 +- core/templates/core/user_detail.jinja | 6 +- counter/views.py | 9 +- eboutic/models.py | 31 ++++ eboutic/views.py | 2 + locale/fr/LC_MESSAGES/django.mo | Bin 31900 -> 31843 bytes locale/fr/LC_MESSAGES/django.po | 249 +++++++++++++------------- sith/settings_sample.py | 5 + 9 files changed, 175 insertions(+), 133 deletions(-) diff --git a/.gitignore b/.gitignore index 9a438fcb..172c719b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ db.sqlite3 +*.log *.pyc *__pycache__* .DS_Store diff --git a/core/management/commands/populate.py b/core/management/commands/populate.py index 4418bda5..842c2dca 100644 --- a/core/management/commands/populate.py +++ b/core/management/commands/populate.py @@ -55,6 +55,7 @@ class Command(BaseCommand): unix_name=settings.SITH_LAUNDERETTE_MANAGER['unix_name'], address=settings.SITH_LAUNDERETTE_MANAGER['address']) launderette_club.save() + self.reset_index("club") for b in settings.SITH_COUNTER_BARS: g = Group(name=b[1]+" admin") g.save() @@ -271,10 +272,10 @@ Cette page vise à documenter la syntaxe *Markdown* utilisée sur le site. credit.save() debit = AccountingType(code=607, label="Had to pay a beer", movement_type='debit') debit.save() - Operation(journal=gj, date=date.today(), amount=666.42, label="Satanic answer", + Operation(journal=gj, date=date.today(), amount=666.42, remark="An answer to life...", mode="CASH", done=True, accounting_type=credit, target_type="USER", target_id=skia.id).save() - Operation(journal=gj, date=date.today(), amount=42, label="Answer", + Operation(journal=gj, date=date.today(), amount=42, remark="An answer to life...", mode="CASH", done=False, accounting_type=debit, target_type="CLUB", target_id=bar_club.id).save() woenzco = Company(name="Woenzel & co") diff --git a/core/templates/core/user_detail.jinja b/core/templates/core/user_detail.jinja index 6b85fdac..e3791373 100644 --- a/core/templates/core/user_detail.jinja +++ b/core/templates/core/user_detail.jinja @@ -41,13 +41,13 @@ -{% if user.membership.filter(end_date=None).exists() or user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) %} +{% if user.membership.filter(end_date=None).exists() or user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) or user == profile %} {# if the user is member of a club, he can view the subscription state #}

{% if get_subscriber(profile).is_subscribed() %} -{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}User is subscriber until {{ subscription_end }}{% endtrans %} +{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %} {% else %} -{% trans %}User is not subscribed. {% endtrans %} +{% trans %}Not subscribed{% endtrans %} {% trans %}New subscription{% endtrans %} {% endif %}

diff --git a/counter/views.py b/counter/views.py index ef727f06..1cf8086c 100644 --- a/counter/views.py +++ b/counter/views.py @@ -212,9 +212,12 @@ class CounterClick(DetailView): total = self.sum_basket(request) product = self.get_product(pid) can_buy = False - for g in product.buying_groups.all(): - if self.customer.user.is_in_group(g.name): - can_buy = True + if not product.buying_groups.exists(): + can_buy = True + else: + for g in product.buying_groups.all(): + if self.customer.user.is_in_group(g.name): + can_buy = True if not can_buy: request.session['not_allowed'] = True return False diff --git a/eboutic/models.py b/eboutic/models.py index 2f4bc61b..98c019d5 100644 --- a/eboutic/models.py +++ b/eboutic/models.py @@ -5,6 +5,7 @@ from django.conf import settings from accounting.models import CurrencyField from counter.models import Counter, Product, Customer, Selling, Refilling from core.models import User +from subscription.models import Subscription, Subscriber class Basket(models.Model): """ @@ -92,6 +93,36 @@ class Invoice(models.Model): date=self.date, ) new.save() + if i.product_id == settings.SITH_PRODUCT_SUBSCRIPTION_ONE_SEMESTER: + s = Subscriber.objects.filter(id=self.user.id).first() + sub = Subscription( + member=s, + subscription_type='un-semestre', + payment_method="EBOUTIC", + location="EBOUTIC", + ) + sub.subscription_start = Subscription.compute_start() + sub.subscription_start = Subscription.compute_start( + duration=settings.SITH_SUBSCRIPTIONS[sub.subscription_type]['duration']) + sub.subscription_end = Subscription.compute_end( + duration=settings.SITH_SUBSCRIPTIONS[sub.subscription_type]['duration'], + start=sub.subscription_start) + sub.save() + elif i.product_id == settings.SITH_PRODUCT_SUBSCRIPTION_TWO_SEMESTERS: + s = Subscriber.objects.filter(id=self.user.id).first() + sub = Subscription( + member=s, + subscription_type='deux-semestres', + payment_method="EBOUTIC", + location="EBOUTIC", + ) + sub.subscription_start = Subscription.compute_start() + sub.subscription_start = Subscription.compute_start( + duration=settings.SITH_SUBSCRIPTIONS[sub.subscription_type]['duration']) + sub.subscription_end = Subscription.compute_end( + duration=settings.SITH_SUBSCRIPTIONS[sub.subscription_type]['duration'], + start=sub.subscription_start) + sub.save() self.validated = True self.save() diff --git a/eboutic/views.py b/eboutic/views.py index 905711c0..cc3aaabf 100644 --- a/eboutic/views.py +++ b/eboutic/views.py @@ -55,6 +55,8 @@ class EbouticMain(TemplateView): """ Add a product to the basket """ try: p = Product.objects.filter(id=int(request.POST['product_id'])).first() + if not p.buying_groups.exists(): + self.basket.add_product(p) for g in p.buying_groups.all(): if request.user.is_in_group(g.name): self.basket.add_product(p) diff --git a/locale/fr/LC_MESSAGES/django.mo b/locale/fr/LC_MESSAGES/django.mo index 3120bf7e7a8de226c1957dbd871ce149c986ab05..4c1d977ca121bdb77798937be9a9b016809585af 100644 GIT binary patch delta 8024 zcmYk=2~?I<9>?+LRS*$S5fO!ueOJK+7ZAZEaTk}w)KVcA)Nn(SEZ=cyF?Di$%Jhs{ z*68F+nM&4}GmVaoS~jJnt;ftvt(hn-8&ad0?~mv2IlbrHKKFm0yWjh~FSg~n@4`>M zJ*$HJ%^kq3UO&`p-qx zAApfK9$RB&Z^z$IVWm~vfa-8Nw!+;OAI2WU?_eG_DR7+j*cZca3TgtCs0l7Xwf_yO zKNrLC8Pr7fVOu;};P)Dwqu_1|E~7da*vD}Ka0F^4V^BMECx&1dHVlZ(h?m&&m8cz9 zivw{Bs{IAj1inTe-bD3Z?~HY)TgMq&8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uF=yqV-CkaRP%QJ?dqhe>yl4v>=FpudMN z%YDRO;v4B6^C$VPxTpR3zIZn_H#Kb#PbKj?@)9lenW|n$ecZC#9(gJmPO70KoL24e zKDFR8mvofW+TD~}p8YMkMrz_nZ;`fGt7^)BLyC4U0#G+3D1A7o3flOBzbr zPy8YBnmLo)m3ifP-;>j44y7HiJ4wfVmN=25J6P#{o|hUsgy_dlk{c25C-?rZlFpVN z=9UG@vwyILvnV}A>SDDYS@}43TcE%1diO-2WBM4YTSVP^D(s!iMq%b#_pC3_6uGIZSeu=Nh{ZoEwdLi-eNHchB2WcE>1+hLiyS~o- z*==`V=Zvy8R#@cKIrkF}wz6%Xc5?>`zOjqz&Ea)4^)Phzs2R>Fh85 zhSGnw)bV$!nM13tq-RNcDbs%s&cjC1tE9GW_kxZE#gzW|nM&pz;tN*r0zPK>6t}LR zx390;SkToMH1WfvLh`fmA=2|CeM(7_-Jf;I z>|Q}hf1<-G=Cj>ejKZUq_iFe?agTKw6>*7hhMV2BM|yzz>7-tiOeDQT{tjG&Rqn#B z9ep>r>$+z8{_gJXnpr%J(rQvIEk@u{l0HXBBS^!E`{HY)Q>0AdH1~U+oMJ7%q*Py2 z-;v&+Y@(HahRK{rJBv%OpF6hOuqdCE{Htk4w}kkn*ZMyk-n6o!U3jZGg<0;Bq3N-~ z`mFlJv+HXY1!vD)F_?bWwwe054v(~{bV$fjMvbK&lS+jA20 g7dHeK1nXxt%w4=FYi@l*R;{}v7--sX`$w_=1|TutCjbBd diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 405af61c..8f21d561 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-08-26 20:28+0200\n" +"POT-Creation-Date: 2016-08-29 02:59+0200\n" "PO-Revision-Date: 2016-07-18\n" "Last-Translator: Skia \n" "Language-Team: AE info \n" @@ -123,9 +123,9 @@ msgstr "numéro" msgid "journal" msgstr "classeur" -#: accounting/models.py:179 core/models.py:437 core/models.py:713 +#: accounting/models.py:179 core/models.py:458 core/models.py:734 #: counter/models.py:200 counter/models.py:246 counter/models.py:296 -#: eboutic/models.py:14 eboutic/models.py:47 +#: eboutic/models.py:15 eboutic/models.py:48 msgid "date" msgstr "date" @@ -134,7 +134,7 @@ msgid "comment" msgstr "commentaire" #: accounting/models.py:181 counter/models.py:201 counter/models.py:247 -#: subscription/models.py:34 +#: subscription/models.py:52 msgid "payment method" msgstr "méthode de paiement" @@ -142,7 +142,7 @@ msgstr "méthode de paiement" msgid "cheque number" msgstr "numéro de chèque" -#: accounting/models.py:183 eboutic/models.py:115 +#: accounting/models.py:183 eboutic/models.py:146 msgid "invoice" msgstr "facture" @@ -179,7 +179,7 @@ msgstr "Compte" msgid "Company" msgstr "Entreprise" -#: accounting/models.py:190 sith/settings.py:290 sith/settings_sample.py:272 +#: accounting/models.py:190 sith/settings.py:291 sith/settings_sample.py:273 msgid "Other" msgstr "Autre" @@ -468,7 +468,7 @@ msgid "Done" msgstr "Effectué" #: accounting/templates/accounting/journal_details.jinja:34 -#: counter/views.py:558 +#: counter/views.py:561 msgid "Comment" msgstr "Commentaire" @@ -488,8 +488,7 @@ msgstr "Éditer l'opération" #: core/templates/core/create.jinja:12 core/templates/core/edit.jinja:12 #: core/templates/core/file_edit.jinja:8 core/templates/core/page_prop.jinja:8 #: core/templates/core/pagerev_edit.jinja:24 -#: counter/templates/counter/counter_edit.jinja:12 -#: counter/templates/counter/counter_edit.jinja:14 +#: counter/templates/counter/cash_register_summary.jinja:22 #: subscription/templates/subscription/subscription.jinja:22 msgid "Save" msgstr "Sauver" @@ -540,7 +539,7 @@ msgid "A club with that unix_name already exists" msgstr "Un club avec ce nom UNIX existe déjà." #: club/models.py:145 counter/models.py:280 counter/models.py:294 -#: eboutic/models.py:13 eboutic/models.py:46 launderette/models.py:89 +#: eboutic/models.py:14 eboutic/models.py:47 launderette/models.py:89 #: launderette/models.py:126 msgid "user" msgstr "nom d'utilisateur" @@ -902,120 +901,120 @@ msgstr "adresse des parents" msgid "is subscriber viewable" msgstr "profil visible par les cotisants" -#: core/models.py:257 +#: core/models.py:274 msgid "A user with that username already exists" msgstr "Un utilisateur de ce nom d'utilisateur existe déjà" -#: core/models.py:376 core/templates/core/macros.jinja:17 +#: core/models.py:393 core/templates/core/macros.jinja:17 #: core/templates/core/user_detail.jinja:14 #: core/templates/core/user_detail.jinja:16 #: core/templates/core/user_edit.jinja:16 msgid "Profile" msgstr "Profil" -#: core/models.py:414 +#: core/models.py:435 msgid "Visitor" msgstr "Visiteur" -#: core/models.py:419 +#: core/models.py:440 msgid "define if we show a users stats" msgstr "Definit si l'on montre les statistiques de l'utilisateur" -#: core/models.py:421 +#: core/models.py:442 msgid "Show your account statistics to others" msgstr "Montrez vos statistiques de compte aux autres" -#: core/models.py:428 +#: core/models.py:449 msgid "file name" msgstr "nom du fichier" -#: core/models.py:429 core/models.py:562 +#: core/models.py:450 core/models.py:583 msgid "parent" msgstr "parent" -#: core/models.py:430 core/models.py:440 +#: core/models.py:451 core/models.py:461 msgid "file" msgstr "fichier" -#: core/models.py:431 +#: core/models.py:452 msgid "owner" msgstr "propriétaire" -#: core/models.py:432 core/models.py:568 +#: core/models.py:453 core/models.py:589 msgid "edit group" msgstr "groupe d'édition" -#: core/models.py:433 core/models.py:569 +#: core/models.py:454 core/models.py:590 msgid "view group" msgstr "groupe de vue" -#: core/models.py:434 +#: core/models.py:455 msgid "is folder" msgstr "est un dossier" -#: core/models.py:435 +#: core/models.py:456 msgid "mime type" msgstr "type mime" -#: core/models.py:436 +#: core/models.py:457 msgid "size" msgstr "taille" -#: core/models.py:466 +#: core/models.py:487 msgid "Character '/' not authorized in name" msgstr "Le caractère '/' n'est pas autorisé dans les noms de fichier" -#: core/models.py:469 core/models.py:474 +#: core/models.py:490 core/models.py:495 msgid "Loop in folder tree" msgstr "Boucle dans l'arborescence des dossiers" -#: core/models.py:478 +#: core/models.py:499 msgid "You can not make a file be a children of a non folder file" msgstr "" "Vous ne pouvez pas mettre un fichier enfant de quelque chose qui n'est pas " "un dossier" -#: core/models.py:482 +#: core/models.py:503 msgid "Duplicate file" msgstr "Un fichier de ce nom existe déjà" -#: core/models.py:492 +#: core/models.py:513 msgid "You must provide a file" msgstr "Vous devez fournir un fichier" -#: core/models.py:517 +#: core/models.py:538 msgid "Folder: " msgstr "Dossier : " -#: core/models.py:519 +#: core/models.py:540 msgid "File: " msgstr "Fichier : " -#: core/models.py:561 core/models.py:565 +#: core/models.py:582 core/models.py:586 msgid "page name" msgstr "nom de la page" -#: core/models.py:566 +#: core/models.py:587 msgid "owner group" msgstr "groupe propriétaire" -#: core/models.py:597 +#: core/models.py:618 msgid "Duplicate page" msgstr "Une page de ce nom existe déjà" -#: core/models.py:603 +#: core/models.py:624 msgid "Loop in page tree" msgstr "Boucle dans l'arborescence des pages" -#: core/models.py:710 +#: core/models.py:731 msgid "revision" msgstr "révision" -#: core/models.py:711 +#: core/models.py:732 msgid "page title" msgstr "titre de la page" -#: core/models.py:712 +#: core/models.py:733 msgid "page content" msgstr "contenu de la page" @@ -1111,8 +1110,7 @@ msgstr "Annuler" #: core/templates/core/edit.jinja:4 core/templates/core/edit.jinja.py:8 #: core/templates/core/file_edit.jinja:4 -#: counter/templates/counter/counter_edit.jinja:4 -#: counter/templates/counter/counter_edit.jinja:8 +#: counter/templates/counter/cash_register_summary.jinja:4 #, python-format msgid "Edit %(obj)s" msgstr "Éditer %(obj)s" @@ -1460,13 +1458,12 @@ msgid "Option: " msgstr "Filière : " #: core/templates/core/user_detail.jinja:48 -#, python-format -msgid "User is subscriber until %(subscription_end)s" -msgstr "L'utilisateur est cotisant jusqu'au %(subscription_end)s" +msgid "Subscribed until %(subscription_end)s" +msgstr "Cotisant jusqu'au %(subscription_end)s" #: core/templates/core/user_detail.jinja:50 -msgid "User is not subscribed. " -msgstr "L'utilisateur n'est pas cotisant." +msgid "Not subscribed" +msgstr "Non cotisant" #: core/templates/core/user_detail.jinja:51 #: subscription/templates/subscription/subscription.jinja:4 @@ -1557,7 +1554,7 @@ msgstr "Gestion de Sith" msgid "Subscriptions" msgstr "Cotisations" -#: core/templates/core/user_tools.jinja:22 counter/views.py:473 +#: core/templates/core/user_tools.jinja:22 counter/views.py:476 msgid "Counters" msgstr "Comptoirs" @@ -1707,7 +1704,8 @@ msgstr "Bureau" #: eboutic/templates/eboutic/eboutic_main.jinja:24 #: eboutic/templates/eboutic/eboutic_makecommand.jinja:8 #: eboutic/templates/eboutic/eboutic_payment_result.jinja:4 -#: sith/settings.py:289 sith/settings_sample.py:271 +#: sith/settings.py:290 sith/settings.py:298 sith/settings_sample.py:272 +#: sith/settings_sample.py:280 msgid "Eboutic" msgstr "Eboutic" @@ -1732,11 +1730,11 @@ msgstr "est validé" msgid "refilling" msgstr "rechargement" -#: counter/models.py:242 eboutic/models.py:102 +#: counter/models.py:242 eboutic/models.py:133 msgid "unit price" msgstr "prix unitaire" -#: counter/models.py:243 counter/models.py:320 eboutic/models.py:103 +#: counter/models.py:243 counter/models.py:320 eboutic/models.py:134 msgid "quantity" msgstr "quantité" @@ -1744,9 +1742,9 @@ msgstr "quantité" msgid "Sith account" msgstr "Compte utilisateur" -#: counter/models.py:248 sith/settings.py:282 sith/settings.py:287 -#: sith/settings.py:308 sith/settings_sample.py:264 -#: sith/settings_sample.py:269 sith/settings_sample.py:290 +#: counter/models.py:248 sith/settings.py:283 sith/settings.py:288 +#: sith/settings.py:310 sith/settings_sample.py:265 +#: sith/settings_sample.py:270 sith/settings_sample.py:292 msgid "Credit card" msgstr "Carte banquaire" @@ -1786,6 +1784,11 @@ msgstr "chèque" msgid "cash register summary item" msgstr "élément de relevé de caisse" +#: counter/templates/counter/cash_register_summary.jinja:8 +#: counter/templates/counter/counter_main.jinja:43 +msgid "Make a cash register summary" +msgstr "Faire un relevé de caisse" + #: counter/templates/counter/counter_click.jinja:29 msgid "Customer" msgstr "Client" @@ -1882,10 +1885,6 @@ msgstr "valider" msgid "Please, login" msgstr "Merci de vous identifier" -#: counter/templates/counter/counter_main.jinja:43 -msgid "Make a cash register summary" -msgstr "Faire un relevé de caisse" - #: counter/templates/counter/counter_main.jinja:46 msgid "Barman: " msgstr "Barman : " @@ -1932,101 +1931,101 @@ msgstr "Mauvais identifiants" msgid "User is not subscriber" msgstr "L'utilisateur n'est pas cotisant." -#: counter/views.py:258 +#: counter/views.py:261 msgid "END" msgstr "FIN" -#: counter/views.py:260 +#: counter/views.py:263 msgid "CAN" msgstr "ANN" -#: counter/views.py:290 +#: counter/views.py:293 msgid "You have not enough money to buy all the basket" msgstr "Vous n'avez pas assez d'argent pour acheter le panier" -#: counter/views.py:470 +#: counter/views.py:473 msgid "Parent product" msgstr "Produit parent" -#: counter/views.py:471 +#: counter/views.py:474 msgid "Buying groups" msgstr "Groupes d'achat" -#: counter/views.py:538 +#: counter/views.py:541 msgid "10 cents" msgstr "10 centimes" -#: counter/views.py:539 +#: counter/views.py:542 msgid "20 cents" msgstr "20 centimes" -#: counter/views.py:540 +#: counter/views.py:543 msgid "50 cents" msgstr "50 centimes" -#: counter/views.py:541 +#: counter/views.py:544 msgid "1 euro" msgstr "1 €" -#: counter/views.py:542 +#: counter/views.py:545 msgid "2 euros" msgstr "2 €" -#: counter/views.py:543 +#: counter/views.py:546 msgid "5 euros" msgstr "5 €" -#: counter/views.py:544 +#: counter/views.py:547 msgid "10 euros" msgstr "10 €" -#: counter/views.py:545 +#: counter/views.py:548 msgid "20 euros" msgstr "20 €" -#: counter/views.py:546 +#: counter/views.py:549 msgid "50 euros" msgstr "50 €" -#: counter/views.py:547 +#: counter/views.py:550 msgid "100 euros" msgstr "100 €" -#: counter/views.py:548 counter/views.py:550 counter/views.py:552 -#: counter/views.py:554 counter/views.py:556 +#: counter/views.py:551 counter/views.py:553 counter/views.py:555 +#: counter/views.py:557 counter/views.py:559 msgid "Check amount" msgstr "Montant du chèque" -#: counter/views.py:549 counter/views.py:551 counter/views.py:553 -#: counter/views.py:555 counter/views.py:557 +#: counter/views.py:552 counter/views.py:554 counter/views.py:556 +#: counter/views.py:558 counter/views.py:560 msgid "Check quantity" msgstr "Nombre de chèque" -#: counter/views.py:559 +#: counter/views.py:562 msgid "Emptied" msgstr "Coffre vidé" -#: eboutic/models.py:48 +#: eboutic/models.py:49 msgid "validated" msgstr "validé" -#: eboutic/models.py:61 +#: eboutic/models.py:62 msgid "Invoice already validated" msgstr "Facture déjà validée" -#: eboutic/models.py:99 +#: eboutic/models.py:130 msgid "product id" msgstr "ID du produit" -#: eboutic/models.py:100 +#: eboutic/models.py:131 msgid "product name" msgstr "nom du produit" -#: eboutic/models.py:101 +#: eboutic/models.py:132 msgid "product type id" msgstr "id du type du produit" -#: eboutic/models.py:112 +#: eboutic/models.py:143 msgid "basket" msgstr "panier" @@ -2065,7 +2064,7 @@ msgstr "Le paiement a été effectué" msgid "Return to eboutic" msgstr "Retourner à l'eboutic" -#: eboutic/views.py:138 +#: eboutic/views.py:140 msgid "You do not have enough money to buy the basket" msgstr "Vous n'avez pas assez d'argent pour acheter le panier" @@ -2154,12 +2153,12 @@ msgid "Washing and drying" msgstr "Lavage et séchage" #: launderette/templates/launderette/launderette_book.jinja:26 -#: sith/settings.py:418 sith/settings_sample.py:400 +#: sith/settings.py:424 sith/settings_sample.py:406 msgid "Washing" msgstr "Lavage" #: launderette/templates/launderette/launderette_book.jinja:30 -#: sith/settings.py:418 sith/settings_sample.py:400 +#: sith/settings.py:424 sith/settings_sample.py:406 msgid "Drying" msgstr "Séchage" @@ -2214,148 +2213,148 @@ msgstr "L'utilisateur n'a pas réservé de créneau" msgid "Token not found" msgstr "Jeton non trouvé" -#: sith/settings.py:173 sith/settings_sample.py:160 +#: sith/settings.py:174 sith/settings_sample.py:161 msgid "English" msgstr "Anglais" -#: sith/settings.py:174 sith/settings_sample.py:161 +#: sith/settings.py:175 sith/settings_sample.py:162 msgid "French" msgstr "Français" -#: sith/settings.py:279 sith/settings.py:286 sith/settings.py:306 -#: sith/settings_sample.py:261 sith/settings_sample.py:268 -#: sith/settings_sample.py:288 +#: sith/settings.py:280 sith/settings.py:287 sith/settings.py:308 +#: sith/settings_sample.py:262 sith/settings_sample.py:269 +#: sith/settings_sample.py:290 msgid "Check" msgstr "Chèque" -#: sith/settings.py:280 sith/settings.py:288 sith/settings.py:307 -#: sith/settings_sample.py:262 sith/settings_sample.py:270 -#: sith/settings_sample.py:289 +#: sith/settings.py:281 sith/settings.py:289 sith/settings.py:309 +#: sith/settings_sample.py:263 sith/settings_sample.py:271 +#: sith/settings_sample.py:291 msgid "Cash" msgstr "Espèces" -#: sith/settings.py:281 sith/settings_sample.py:263 +#: sith/settings.py:282 sith/settings_sample.py:264 msgid "Transfert" msgstr "Virement" -#: sith/settings.py:294 sith/settings_sample.py:276 +#: sith/settings.py:295 sith/settings_sample.py:277 msgid "Belfort" msgstr "Belfort" -#: sith/settings.py:295 sith/settings_sample.py:277 +#: sith/settings.py:296 sith/settings_sample.py:278 msgid "Sevenans" msgstr "Sevenans" -#: sith/settings.py:296 sith/settings_sample.py:278 +#: sith/settings.py:297 sith/settings_sample.py:279 msgid "Montbéliard" msgstr "Montbéliard" -#: sith/settings.py:331 sith/settings_sample.py:313 +#: sith/settings.py:337 sith/settings_sample.py:319 msgid "One semester" msgstr "Un semestre" -#: sith/settings.py:336 sith/settings_sample.py:318 +#: sith/settings.py:342 sith/settings_sample.py:324 msgid "Two semesters" msgstr "Deux semestres" -#: sith/settings.py:341 sith/settings_sample.py:323 +#: sith/settings.py:347 sith/settings_sample.py:329 msgid "Common core cursus" msgstr "Cursus tronc commun" -#: sith/settings.py:346 sith/settings.py:351 sith/settings_sample.py:328 -#: sith/settings_sample.py:333 +#: sith/settings.py:352 sith/settings.py:357 sith/settings_sample.py:334 +#: sith/settings_sample.py:339 msgid "Branch cursus" msgstr "Cursus branche" -#: sith/settings.py:356 sith/settings_sample.py:338 +#: sith/settings.py:362 sith/settings_sample.py:344 msgid "Honorary member" msgstr "Membre honoraire" -#: sith/settings.py:361 sith/settings_sample.py:343 +#: sith/settings.py:367 sith/settings_sample.py:349 msgid "Assidu member" msgstr "Membre d'Assidu" -#: sith/settings.py:366 sith/settings_sample.py:348 +#: sith/settings.py:372 sith/settings_sample.py:354 msgid "Amicale/DOCEO member" msgstr "Membre de l'Amicale/DOCEO" -#: sith/settings.py:371 sith/settings_sample.py:353 +#: sith/settings.py:377 sith/settings_sample.py:359 msgid "UT network member" msgstr "Cotisant du réseau UT" -#: sith/settings.py:376 sith/settings_sample.py:358 +#: sith/settings.py:382 sith/settings_sample.py:364 msgid "CROUS member" msgstr "Membres du CROUS" -#: sith/settings.py:381 sith/settings_sample.py:363 +#: sith/settings.py:387 sith/settings_sample.py:369 msgid "Sbarro/ESTA member" msgstr "Membre de Sbarro ou de l'ESTA" -#: sith/settings.py:389 sith/settings_sample.py:371 +#: sith/settings.py:395 sith/settings_sample.py:377 msgid "President" msgstr "Président" -#: sith/settings.py:390 sith/settings_sample.py:372 +#: sith/settings.py:396 sith/settings_sample.py:378 msgid "Vice-President" msgstr "Vice-Président" -#: sith/settings.py:391 sith/settings_sample.py:373 +#: sith/settings.py:397 sith/settings_sample.py:379 msgid "Treasurer" msgstr "Trésorier" -#: sith/settings.py:392 sith/settings_sample.py:374 +#: sith/settings.py:398 sith/settings_sample.py:380 msgid "Communication supervisor" msgstr "Responsable com" -#: sith/settings.py:393 sith/settings_sample.py:375 +#: sith/settings.py:399 sith/settings_sample.py:381 msgid "Secretary" msgstr "Secrétaire" -#: sith/settings.py:394 sith/settings_sample.py:376 +#: sith/settings.py:400 sith/settings_sample.py:382 msgid "IT supervisor" msgstr "Responsable info" -#: sith/settings.py:395 sith/settings_sample.py:377 +#: sith/settings.py:401 sith/settings_sample.py:383 msgid "Board member" msgstr "Membre du bureau" -#: sith/settings.py:396 sith/settings_sample.py:378 +#: sith/settings.py:402 sith/settings_sample.py:384 msgid "Active member" msgstr "Membre actif" -#: sith/settings.py:397 sith/settings_sample.py:379 +#: sith/settings.py:403 sith/settings_sample.py:385 msgid "Curious" msgstr "Curieux" -#: subscription/models.py:13 +#: subscription/models.py:16 msgid "Bad subscription type" msgstr "Mauvais type de cotisation" -#: subscription/models.py:17 +#: subscription/models.py:20 msgid "Bad payment method" msgstr "Mauvais type de paiement" -#: subscription/models.py:29 +#: subscription/models.py:47 msgid "subscription type" msgstr "type d'inscription" -#: subscription/models.py:32 +#: subscription/models.py:50 msgid "subscription start" msgstr "début de la cotisation" -#: subscription/models.py:33 +#: subscription/models.py:51 msgid "subscription end" msgstr "fin de la cotisation" -#: subscription/models.py:36 +#: subscription/models.py:54 msgid "location" msgstr "lieu" -#: subscription/models.py:46 +#: subscription/models.py:63 msgid "You can not subscribe many time for the same period" msgstr "Vous ne pouvez pas cotiser plusieurs fois pour la même période" -#: subscription/models.py:50 +#: subscription/models.py:67 msgid "You are trying to create a subscription without member" msgstr "Vous essayez de créer une cotisation sans membre" diff --git a/sith/settings_sample.py b/sith/settings_sample.py index 4cd378f0..38065b55 100644 --- a/sith/settings_sample.py +++ b/sith/settings_sample.py @@ -277,6 +277,7 @@ SITH_SUBSCRIPTION_LOCATIONS = [ ('BELFORT', _('Belfort')), ('SEVENANS', _('Sevenans')), ('MONTBELIARD', _('Montbéliard')), + ('EBOUTIC', _('Eboutic')), ] SITH_COUNTER_BARS = [ @@ -307,6 +308,10 @@ SITH_COUNTER_BANK = [ # Defines which product type is the refilling type, and thus increases the account amount SITH_COUNTER_PRODUCTTYPE_REFILLING = 11 +# Defines which product is the one year subscription and which one is the six month subscription +SITH_PRODUCT_SUBSCRIPTION_ONE_SEMESTER = 93 +SITH_PRODUCT_SUBSCRIPTION_TWO_SEMESTERS = 94 + # Subscription durations are in semestres # Be careful, modifying this parameter will need a migration to be applied SITH_SUBSCRIPTIONS = {