From fb8e7ceb5b19a55b1ddf7716c4de7e93586cdb98 Mon Sep 17 00:00:00 2001 From: Skia Date: Wed, 24 Aug 2016 21:49:46 +0200 Subject: [PATCH] Some templating and migration fix --- .../migrations/0004_auto_20160824_2145.py | 34 ++ accounting/models.py | 21 +- .../accounting/bank_account_details.jinja | 6 +- .../accounting/bank_account_list.jinja | 3 - .../accounting/club_account_details.jinja | 3 + .../templates/accounting/operation_edit.jinja | 82 +++-- accounting/views.py | 20 +- core/lookups.py | 20 +- core/models.py | 7 + core/templates/core/base.jinja | 1 + locale/fr/LC_MESSAGES/django.mo | Bin 30357 -> 30657 bytes locale/fr/LC_MESSAGES/django.po | 291 ++++++++++-------- migrate.py | 66 ++-- 13 files changed, 358 insertions(+), 196 deletions(-) create mode 100644 accounting/migrations/0004_auto_20160824_2145.py diff --git a/accounting/migrations/0004_auto_20160824_2145.py b/accounting/migrations/0004_auto_20160824_2145.py new file mode 100644 index 00000000..0636463b --- /dev/null +++ b/accounting/migrations/0004_auto_20160824_2145.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounting', '0003_auto_20160824_1732'), + ] + + operations = [ + migrations.AlterModelOptions( + name='accountingtype', + options={'ordering': ['movement_type', 'code'], 'verbose_name': 'accounting type'}, + ), + migrations.AlterModelOptions( + name='bankaccount', + options={'ordering': ['club', 'name'], 'verbose_name': 'Bank account'}, + ), + migrations.AlterModelOptions( + name='clubaccount', + options={'ordering': ['bank_account', 'name'], 'verbose_name': 'Club account'}, + ), + migrations.AlterModelOptions( + name='generaljournal', + options={'ordering': ['-start_date'], 'verbose_name': 'General journal'}, + ), + migrations.AlterModelOptions( + name='simplifiedaccountingtype', + options={'ordering': ['accounting_type__movement_type', 'accounting_type__code'], 'verbose_name': 'simplified type'}, + ), + ] diff --git a/accounting/models.py b/accounting/models.py index 44508a4d..c4ee8614 100644 --- a/accounting/models.py +++ b/accounting/models.py @@ -48,6 +48,10 @@ class BankAccount(models.Model): number = models.CharField(_('account number'), max_length=255, blank=True) club = models.ForeignKey(Club, related_name="bank_accounts", verbose_name=_("club")) + class Meta: + verbose_name = _("Bank account") + ordering = ['club', 'name'] + def is_owned_by(self, user): """ Method to see if that object can be edited by the given user @@ -70,6 +74,10 @@ class ClubAccount(models.Model): club = models.ForeignKey(Club, related_name="club_account", verbose_name=_("club")) bank_account = models.ForeignKey(BankAccount, related_name="club_accounts", verbose_name=_("bank account")) + class Meta: + verbose_name = _("Club account") + ordering = ['bank_account', 'name'] + def is_owned_by(self, user): """ Method to see if that object can be edited by the given user @@ -118,6 +126,10 @@ class GeneralJournal(models.Model): amount = CurrencyField(_('amount'), default=0) effective_amount = CurrencyField(_('effective_amount'), default=0) + class Meta: + verbose_name = _("General journal") + ordering = ['-start_date'] + def is_owned_by(self, user): """ Method to see if that object can be edited by the given user @@ -259,10 +271,12 @@ class AccountingType(models.Model): ], ) label = models.CharField(_('label'), max_length=128) - movement_type = models.CharField(_('movement type'), choices=[('CREDIT', 'Credit'), ('DEBIT', 'Debit'), ('NEUTRAL', 'Neutral')], max_length=12) + movement_type = models.CharField(_('movement type'), choices=[('CREDIT', _('Credit')), ('DEBIT', _('Debit')), + ('NEUTRAL', _('Neutral'))], max_length=12) class Meta: verbose_name = _("accounting type") + ordering = ['movement_type', 'code'] def is_owned_by(self, user): """ @@ -276,7 +290,7 @@ class AccountingType(models.Model): return reverse('accounting:type_list') def __str__(self): - return self.code+" - "+self.movement_type+" - "+self.label + return self.code+" - "+self.get_movement_type_display()+" - "+self.label class SimplifiedAccountingType(models.Model): """ @@ -288,6 +302,7 @@ class SimplifiedAccountingType(models.Model): class Meta: verbose_name = _("simplified type") + ordering = ['accounting_type__movement_type', 'accounting_type__code'] @property def movement_type(self): @@ -300,5 +315,5 @@ class SimplifiedAccountingType(models.Model): return reverse('accounting:simple_type_list') def __str__(self): - return self.label+" - "+self.accounting_type.code+" - "+self.get_movement_type_display() + return self.get_movement_type_display()+" - "+self.accounting_type.code+" - "+self.label diff --git a/accounting/templates/accounting/bank_account_details.jinja b/accounting/templates/accounting/bank_account_details.jinja index 19a121ef..076d2753 100644 --- a/accounting/templates/accounting/bank_account_details.jinja +++ b/accounting/templates/accounting/bank_account_details.jinja @@ -11,6 +11,9 @@


{% trans %}Bank account: {% endtrans %}{{ object.name }}

+ {% if user.is_root and not object.club_accounts.exists() %} + {% trans %}Delete{% endtrans %} + {% endif %}

{% trans %}Infos{% endtrans %}

diff --git a/accounting/templates/accounting/bank_account_list.jinja b/accounting/templates/accounting/bank_account_list.jinja index 7456c7a2..83cdd398 100644 --- a/accounting/templates/accounting/bank_account_list.jinja +++ b/accounting/templates/accounting/bank_account_list.jinja @@ -19,9 +19,6 @@ {% for a in object_list %}
  • {{ a }} - {% trans %}Edit{% endtrans %} - {% if user.is_root %} - - {% trans %}Delete{% endtrans %} - {% endif %}
  • {% endfor %} diff --git a/accounting/templates/accounting/club_account_details.jinja b/accounting/templates/accounting/club_account_details.jinja index 69095650..9fa9fe58 100644 --- a/accounting/templates/accounting/club_account_details.jinja +++ b/accounting/templates/accounting/club_account_details.jinja @@ -12,6 +12,9 @@


    {% trans %}Club account:{% endtrans %} {{ object.name }}

    + {% if user.is_root and not object.journals.exists() %} + {% trans %}Delete{% endtrans %} + {% endif %} {% if not object.has_open_journal() %}

    {% trans %}New journal{% endtrans %}

    {% else %} diff --git a/accounting/templates/accounting/operation_edit.jinja b/accounting/templates/accounting/operation_edit.jinja index 77cdc0cb..9866892d 100644 --- a/accounting/templates/accounting/operation_edit.jinja +++ b/accounting/templates/accounting/operation_edit.jinja @@ -5,6 +5,14 @@ {% endblock %} {% block content %} +

    +{% trans %}Accounting{% endtrans %} > +{{object.club_account.bank_account }} > +{{ object.club_account }} > +{{ object.name }} > +{% trans %}Edit operation{% endtrans %} +

    +

    {% trans %}Edit operation{% endtrans %}

    {% csrf_token %} @@ -12,24 +20,12 @@ {{ form.target_id }}

    {{ form.amount.errors }} {{ form.amount }}

    {{ form.remark.errors }} {{ form.remark }}

    -

    {{ form.target_type.errors }}

    - {% for choice in form.target_type %} - {% if choice.choice_value != "" %} - {{ choice }} - {% if choice.choice_value == "USER" %} - {{ form.user }} - {% elif choice.choice_value == "CLUB" %} - {{ form.club }} - {% elif choice.choice_value == "ACCOUNT" %} - {{ form.club_account }} - {% elif choice.choice_value == "COMPANY" %} - {{ form.company }} - {% elif choice.choice_value == "OTHER" %} - {{ form.target_label }} - {% endif %} - {% else %} - {% endif %} - {% endfor %} +

    {{ form.target_type.errors }} {{ form.target_type }}

    + {{ form.user }} + {{ form.club }} + {{ form.club_account }} + {{ form.company }} + {{ form.target_label }}

    {{ form.date.errors }} {{ form.date }}

    {{ form.mode.errors }} {{ form.mode }}

    {{ form.cheque_number.errors }} {{ @@ -48,7 +44,55 @@ {{ super() }} {% endblock %} diff --git a/accounting/views.py b/accounting/views.py index a951498e..429af411 100644 --- a/accounting/views.py +++ b/accounting/views.py @@ -202,7 +202,6 @@ class OperationForm(forms.ModelForm): 'target_id': HiddenInput, 'date': SelectDate, 'invoice': SelectFile, - 'target_type': forms.RadioSelect, } user = AutoCompleteSelectField('users', help_text=None, required=False) club_account = AutoCompleteSelectField('club_accounts', help_text=None, required=False) @@ -272,11 +271,18 @@ class OperationCreateView(CanCreateMixin, CreateView): def get_initial(self): ret = super(OperationCreateView, self).get_initial() if 'parent' in self.request.GET.keys(): - obj = GeneralJournal.objects.filter(id=int(self.request.GET['parent'])).first() - if obj is not None: - ret['journal'] = obj.id + self.journal = GeneralJournal.objects.filter(id=int(self.request.GET['parent'])).first() + if self.journal is not None: + ret['journal'] = self.journal.id return ret + def get_context_data(self, **kwargs): + """ Add journal to the context """ + kwargs = super(OperationCreateView, self).get_context_data(**kwargs) + if self.journal: + kwargs['object'] = self.journal + return kwargs + class OperationEditView(CanEditMixin, UpdateView): """ An edit view, working as detail for the moment @@ -286,6 +292,12 @@ class OperationEditView(CanEditMixin, UpdateView): form_class = OperationForm template_name = 'accounting/operation_edit.jinja' + def get_context_data(self, **kwargs): + """ Add journal to the context """ + kwargs = super(OperationCreateView, self).get_context_data(**kwargs) + kwargs['object'] = self.object.journal + return kwargs + # Company views class CompanyCreateView(CanCreateMixin, CreateView): diff --git a/core/lookups.py b/core/lookups.py index 524a6322..0ae5ff4c 100644 --- a/core/lookups.py +++ b/core/lookups.py @@ -1,3 +1,4 @@ +from django.core.exceptions import PermissionDenied from ajax_select import register, LookupChannel from core.views.site import search_user @@ -6,8 +7,13 @@ from club.models import Club from counter.models import Product, Counter from accounting.models import ClubAccount, Company +class RightManagedLookupChannel(LookupChannel): + def check_auth(self, request): + if not request.user.subscribed: + raise PermissionDenied + @register('users') -class UsersLookup(LookupChannel): +class UsersLookup(RightManagedLookupChannel): model = User def get_query(self, q, request): @@ -20,7 +26,7 @@ class UsersLookup(LookupChannel): return item.get_display_name() @register('groups') -class GroupsLookup(LookupChannel): +class GroupsLookup(RightManagedLookupChannel): model = Group def get_query(self, q, request): @@ -33,7 +39,7 @@ class GroupsLookup(LookupChannel): return item.name @register('clubs') -class ClubLookup(LookupChannel): +class ClubLookup(RightManagedLookupChannel): model = Club def get_query(self, q, request): @@ -46,7 +52,7 @@ class ClubLookup(LookupChannel): return item.name @register('counters') -class CountersLookup(LookupChannel): +class CountersLookup(RightManagedLookupChannel): model = Counter def get_query(self, q, request): @@ -56,7 +62,7 @@ class CountersLookup(LookupChannel): return item.name @register('products') -class ProductsLookup(LookupChannel): +class ProductsLookup(RightManagedLookupChannel): model = Product def get_query(self, q, request): @@ -66,7 +72,7 @@ class ProductsLookup(LookupChannel): return item.name @register('club_accounts') -class ClubAccountLookup(LookupChannel): +class ClubAccountLookup(RightManagedLookupChannel): model = ClubAccount def get_query(self, q, request): @@ -76,7 +82,7 @@ class ClubAccountLookup(LookupChannel): return item.name @register('companies') -class CompaniesLookup(LookupChannel): +class CompaniesLookup(RightManagedLookupChannel): model = Company def get_query(self, q, request): diff --git a/core/models.py b/core/models.py index a8d9dce0..6474faba 100644 --- a/core/models.py +++ b/core/models.py @@ -377,11 +377,18 @@ class User(AbstractBaseUser): escape(self.get_display_name()), ) + @property + def subscribed(self): + return self.is_in_group(settings.SITH_MAIN_MEMBERS_GROUP) class AnonymousUser(AuthAnonymousUser): def __init__(self, request): super(AnonymousUser, self).__init__() + @property + def subscribed(self): + return False + def is_in_group(self, group_name): """ The anonymous user is only the public group diff --git a/core/templates/core/base.jinja b/core/templates/core/base.jinja index a978460b..0197679c 100644 --- a/core/templates/core/base.jinja +++ b/core/templates/core/base.jinja @@ -38,6 +38,7 @@

    {% for language in LANGUAGES %} {% csrf_token %} + diff --git a/locale/fr/LC_MESSAGES/django.mo b/locale/fr/LC_MESSAGES/django.mo index c00c34dbc3e181afbf92b73a8ff35607ad5973d2..fd3fa4b000c14926d3ad6ccdad059d8fbb9f9c23 100644 GIT binary patch delta 11083 zcmYk?3w%%YAII^tt8H%E*f3(&+%L1uE%({THOw%VFtco7*^E&7DH5r~iju$kB}x4? zce#@!m!jm_RYfAvUnu=w@89{Xhx6#;`T2g&_nhzToZoMj*MIfdbIr$dA>99UhvSZq z<5a;bWgTawuj71JO|_2Gv##UBVlS+S-9egdsQ!%i}z&UyCIve~5wj zG3xqbSQ<~EA6~>z`gbmo=mvK%0LwBOl_O9$sEa`ukNoGf;1A6p8%tv$s@+nogm0ri z?!{7g5H;|VsFnEv!?AKh`k;TOA&DBMU>NqoGMI@PX+Elh@u-1JMzx=Ab{rJqZ?f%QNz2ak^9EEo)%p>E*c$enR8YJg#= zhcnjdTbmus?x=QsPy@3N@>t zUbBX%_KlFY*J*;<gzcoJ89a)Bs{p1E`Jtun`W%85pkj|0fcjJLeAa$~$!$+Xztu8-QAo;i#n? zY2`fB%1l5F^jWKa6*a^8sFhfV8pvX#LuWZw#!XmO@Bil{8u@qD;0Ef#z$WfW1fvE} z9y#SyM$M=vYVXrgE0&FFHx@O3Nv6k~hI-g%;!`*u1N8ov<5NK&9FP8K%+#c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96cb336..4f3a4643 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-24 16:57+0200\n" +"POT-Creation-Date: 2016-08-24 21:38+0200\n" "PO-Revision-Date: 2016-07-18\n" "Last-Translator: Skia \n" "Language-Team: AE info \n" @@ -16,8 +16,8 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: accounting/models.py:34 accounting/models.py:46 accounting/models.py:69 -#: accounting/models.py:115 club/models.py:18 counter/models.py:52 +#: accounting/models.py:34 accounting/models.py:46 accounting/models.py:73 +#: accounting/models.py:123 club/models.py:18 counter/models.py:52 #: counter/models.py:77 counter/models.py:111 launderette/models.py:15 #: launderette/models.py:60 launderette/models.py:85 msgid "name" @@ -35,127 +35,139 @@ msgstr "IBAN" msgid "account number" msgstr "numero de compte" -#: accounting/models.py:49 accounting/models.py:70 club/models.py:146 +#: accounting/models.py:49 accounting/models.py:74 club/models.py:146 #: counter/models.py:86 msgid "club" msgstr "club" -#: accounting/models.py:71 +#: accounting/models.py:52 +msgid "Bank account" +msgstr "Compte en banque" + +#: accounting/models.py:75 msgid "bank account" msgstr "compte en banque" -#: accounting/models.py:106 +#: accounting/models.py:78 +msgid "Club account" +msgstr "Compte club" + +#: accounting/models.py:114 #, python-format msgid "%(club_account)s on %(bank_account)s" msgstr "%(club_account)s sur %(bank_account)s" -#: accounting/models.py:113 club/models.py:147 counter/models.py:297 +#: accounting/models.py:121 club/models.py:147 counter/models.py:297 #: launderette/models.py:122 msgid "start date" msgstr "date de début" -#: accounting/models.py:114 club/models.py:148 counter/models.py:298 +#: accounting/models.py:122 club/models.py:148 counter/models.py:298 msgid "end date" msgstr "date de fin" -#: accounting/models.py:116 +#: accounting/models.py:124 msgid "is closed" msgstr "est fermé" -#: accounting/models.py:117 +#: accounting/models.py:125 msgid "club account" msgstr "compte club" -#: accounting/models.py:118 accounting/models.py:157 counter/models.py:25 +#: accounting/models.py:126 accounting/models.py:169 counter/models.py:25 #: counter/models.py:212 msgid "amount" msgstr "montant" -#: accounting/models.py:119 +#: accounting/models.py:127 msgid "effective_amount" msgstr "montant effectif" -#: accounting/models.py:155 +#: accounting/models.py:130 +msgid "General journal" +msgstr "Classeur" + +#: accounting/models.py:167 msgid "number" msgstr "numéro" -#: accounting/models.py:156 +#: accounting/models.py:168 msgid "journal" msgstr "classeur" -#: accounting/models.py:158 core/models.py:430 core/models.py:706 +#: accounting/models.py:170 core/models.py:437 core/models.py:713 #: counter/models.py:215 counter/models.py:261 eboutic/models.py:14 #: eboutic/models.py:47 msgid "date" msgstr "date" -#: accounting/models.py:159 +#: accounting/models.py:171 msgid "comment" msgstr "commentaire" -#: accounting/models.py:160 counter/models.py:216 counter/models.py:262 +#: accounting/models.py:172 counter/models.py:216 counter/models.py:262 #: subscription/models.py:34 msgid "payment method" msgstr "méthode de paiement" -#: accounting/models.py:161 +#: accounting/models.py:173 msgid "cheque number" msgstr "numéro de chèque" -#: accounting/models.py:162 eboutic/models.py:115 +#: accounting/models.py:174 eboutic/models.py:115 msgid "invoice" msgstr "facture" -#: accounting/models.py:163 +#: accounting/models.py:175 msgid "is done" msgstr "est fait" -#: accounting/models.py:165 +#: accounting/models.py:177 msgid "simple type" msgstr "type simplifié" -#: accounting/models.py:167 accounting/models.py:265 +#: accounting/models.py:179 accounting/models.py:278 msgid "accounting type" msgstr "type comptable" -#: accounting/models.py:168 +#: accounting/models.py:180 msgid "target type" msgstr "type de cible" -#: accounting/models.py:169 +#: accounting/models.py:181 #: launderette/templates/launderette/launderette_admin.jinja:44 msgid "User" msgstr "Utilisateur" -#: accounting/models.py:169 club/templates/club/club_detail.jinja:4 +#: accounting/models.py:181 club/templates/club/club_detail.jinja:4 msgid "Club" msgstr "Club" -#: accounting/models.py:169 core/templates/core/user_base.jinja:18 +#: accounting/models.py:181 core/templates/core/user_base.jinja:18 msgid "Account" msgstr "Compte" -#: accounting/models.py:169 +#: accounting/models.py:181 msgid "Company" msgstr "Entreprise" -#: accounting/models.py:169 sith/settings.py:284 sith/settings_sample.py:267 +#: accounting/models.py:181 sith/settings.py:289 sith/settings_sample.py:272 msgid "Other" msgstr "Autre" -#: accounting/models.py:170 +#: accounting/models.py:182 msgid "target id" msgstr "id de la cible" -#: accounting/models.py:171 +#: accounting/models.py:183 msgid "target label" msgstr "nom de la cible" -#: accounting/models.py:172 +#: accounting/models.py:184 msgid "linked operation" msgstr "opération liée" -#: accounting/models.py:188 +#: accounting/models.py:200 #, python-format msgid "" "The date can not be before the start date of the journal, which is\n" @@ -164,16 +176,16 @@ msgstr "" "La date ne peut pas être avant la date de début du journal, qui est\n" "%(start_date)s." -#: accounting/models.py:191 +#: accounting/models.py:203 msgid "Target does not exists" msgstr "La cible n'existe pas." -#: accounting/models.py:193 +#: accounting/models.py:205 msgid "Please add a target label if you set no existing target" msgstr "" "Merci d'ajouter un nom de cible si vous ne spécifiez pas de cible existante" -#: accounting/models.py:195 +#: accounting/models.py:207 msgid "" "You need to provide ether a simplified accounting type or a standard " "accounting type" @@ -181,27 +193,39 @@ msgstr "" "Vous devez fournir soit un type comptable simplifié ou un type comptable " "standard" -#: accounting/models.py:256 counter/models.py:81 +#: accounting/models.py:268 counter/models.py:81 msgid "code" msgstr "code" -#: accounting/models.py:258 +#: accounting/models.py:270 msgid "An accounting type code contains only numbers" msgstr "Un code comptable ne contient que des numéros" -#: accounting/models.py:261 accounting/models.py:285 counter/models.py:253 +#: accounting/models.py:273 accounting/models.py:299 counter/models.py:253 msgid "label" msgstr "intitulé" -#: accounting/models.py:262 +#: accounting/models.py:274 msgid "movement type" msgstr "type de mouvement" -#: accounting/models.py:287 +#: accounting/models.py:274 +msgid "Credit" +msgstr "Crédit" + +#: accounting/models.py:274 +msgid "Debit" +msgstr "Débit" + +#: accounting/models.py:275 +msgid "Neutral" +msgstr "Neutre" + +#: accounting/models.py:301 msgid "simplified accounting types" msgstr "type simplifié" -#: accounting/models.py:290 +#: accounting/models.py:304 msgid "simplified type" msgstr "type simplifié" @@ -215,6 +239,7 @@ msgstr "Liste des types comptable" #: accounting/templates/accounting/bank_account_list.jinja:9 #: accounting/templates/accounting/club_account_details.jinja:9 #: accounting/templates/accounting/journal_details.jinja:9 +#: accounting/templates/accounting/operation_edit.jinja:9 #: accounting/templates/accounting/simplifiedaccountingtype_list.jinja:9 #: core/templates/core/user_tools.jinja:39 msgid "Accounting" @@ -259,7 +284,7 @@ msgstr "Nouveau compte club" #: accounting/templates/accounting/bank_account_details.jinja:23 #: accounting/templates/accounting/bank_account_list.jinja:21 #: accounting/templates/accounting/club_account_details.jinja:50 -#: accounting/templates/accounting/journal_details.jinja:68 +#: accounting/templates/accounting/journal_details.jinja:66 #: club/templates/club/club_detail.jinja:7 core/templates/core/file.jinja:38 #: core/templates/core/page.jinja:31 core/templates/core/user_base.jinja:10 #: core/templates/core/user_tools.jinja:33 @@ -326,7 +351,7 @@ msgid "End" msgstr "Fin" #: accounting/templates/accounting/club_account_details.jinja:26 -#: accounting/templates/accounting/journal_details.jinja:29 +#: accounting/templates/accounting/journal_details.jinja:28 #: core/templates/core/user_account.jinja:19 #: core/templates/core/user_account.jinja:78 msgid "Amount" @@ -341,17 +366,17 @@ msgid "Closed" msgstr "Fermé" #: accounting/templates/accounting/club_account_details.jinja:29 -#: accounting/templates/accounting/journal_details.jinja:37 +#: accounting/templates/accounting/journal_details.jinja:36 msgid "Actions" msgstr "Actions" #: accounting/templates/accounting/club_account_details.jinja:45 -#: accounting/templates/accounting/journal_details.jinja:56 +#: accounting/templates/accounting/journal_details.jinja:54 msgid "Yes" msgstr "Oui" #: accounting/templates/accounting/club_account_details.jinja:47 -#: accounting/templates/accounting/journal_details.jinja:58 +#: accounting/templates/accounting/journal_details.jinja:56 msgid "No" msgstr "Non" @@ -394,45 +419,41 @@ msgstr "No" msgid "Date" msgstr "Date" -#: accounting/templates/accounting/journal_details.jinja:28 -#: core/templates/core/user_account.jinja:47 -msgid "Label" -msgstr "Intitulé" - -#: accounting/templates/accounting/journal_details.jinja:30 +#: accounting/templates/accounting/journal_details.jinja:29 msgid "Payment mode" msgstr "Méthode de paiement" -#: accounting/templates/accounting/journal_details.jinja:31 +#: accounting/templates/accounting/journal_details.jinja:30 msgid "Target" msgstr "Cible" -#: accounting/templates/accounting/journal_details.jinja:32 +#: accounting/templates/accounting/journal_details.jinja:31 msgid "Code" msgstr "Code" -#: accounting/templates/accounting/journal_details.jinja:33 +#: accounting/templates/accounting/journal_details.jinja:32 msgid "Nature" msgstr "Nature" -#: accounting/templates/accounting/journal_details.jinja:34 +#: accounting/templates/accounting/journal_details.jinja:33 msgid "Done" msgstr "Effectué" -#: accounting/templates/accounting/journal_details.jinja:35 +#: accounting/templates/accounting/journal_details.jinja:34 msgid "Comment" msgstr "Commentaire" -#: accounting/templates/accounting/journal_details.jinja:36 +#: accounting/templates/accounting/journal_details.jinja:35 msgid "File" msgstr "Fichier" #: accounting/templates/accounting/operation_edit.jinja:4 -#: accounting/templates/accounting/operation_edit.jinja:8 +#: accounting/templates/accounting/operation_edit.jinja:13 +#: accounting/templates/accounting/operation_edit.jinja:16 msgid "Edit operation" msgstr "Éditer l'opération" -#: accounting/templates/accounting/operation_edit.jinja:43 +#: accounting/templates/accounting/operation_edit.jinja:39 #: club/templates/club/club_edit.jinja:8 #: club/templates/club/club_edit_prop.jinja:8 #: core/templates/core/create.jinja:12 core/templates/core/edit.jinja:12 @@ -866,109 +887,109 @@ msgstr "Un utilisateur de ce nom d'utilisateur existe déjà" msgid "Profile" msgstr "Profil" -#: core/models.py:407 +#: core/models.py:414 msgid "Visitor" msgstr "Visiteur" -#: core/models.py:412 +#: core/models.py:419 msgid "define if we show a users stats" msgstr "Definit si l'on montre les statistiques de l'utilisateur" -#: core/models.py:414 +#: core/models.py:421 msgid "Show your account statistics to others" msgstr "Montrez vos statistiques de compte aux autres" -#: core/models.py:421 +#: core/models.py:428 msgid "file name" msgstr "nom du fichier" -#: core/models.py:422 core/models.py:555 +#: core/models.py:429 core/models.py:562 msgid "parent" msgstr "parent" -#: core/models.py:423 core/models.py:433 +#: core/models.py:430 core/models.py:440 msgid "file" msgstr "fichier" -#: core/models.py:424 +#: core/models.py:431 msgid "owner" msgstr "propriétaire" -#: core/models.py:425 core/models.py:561 +#: core/models.py:432 core/models.py:568 msgid "edit group" msgstr "groupe d'édition" -#: core/models.py:426 core/models.py:562 +#: core/models.py:433 core/models.py:569 msgid "view group" msgstr "groupe de vue" -#: core/models.py:427 +#: core/models.py:434 msgid "is folder" msgstr "est un dossier" -#: core/models.py:428 +#: core/models.py:435 msgid "mime type" msgstr "type mime" -#: core/models.py:429 +#: core/models.py:436 msgid "size" msgstr "taille" -#: core/models.py:459 +#: core/models.py:466 msgid "Character '/' not authorized in name" msgstr "Le caractère '/' n'est pas autorisé dans les noms de fichier" -#: core/models.py:462 core/models.py:467 +#: core/models.py:469 core/models.py:474 msgid "Loop in folder tree" msgstr "Boucle dans l'arborescence des dossiers" -#: core/models.py:471 +#: core/models.py:478 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:475 +#: core/models.py:482 msgid "Duplicate file" msgstr "Un fichier de ce nom existe déjà" -#: core/models.py:485 +#: core/models.py:492 msgid "You must provide a file" msgstr "Vous devez fournir un fichier" -#: core/models.py:510 +#: core/models.py:517 msgid "Folder: " msgstr "Dossier : " -#: core/models.py:512 +#: core/models.py:519 msgid "File: " msgstr "Fichier : " -#: core/models.py:554 core/models.py:558 +#: core/models.py:561 core/models.py:565 msgid "page name" msgstr "nom de la page" -#: core/models.py:559 +#: core/models.py:566 msgid "owner group" msgstr "groupe propriétaire" -#: core/models.py:590 +#: core/models.py:597 msgid "Duplicate page" msgstr "Une page de ce nom existe déjà" -#: core/models.py:596 +#: core/models.py:603 msgid "Loop in page tree" msgstr "Boucle dans l'arborescence des pages" -#: core/models.py:703 +#: core/models.py:710 msgid "revision" msgstr "révision" -#: core/models.py:704 +#: core/models.py:711 msgid "page title" msgstr "titre de la page" -#: core/models.py:705 +#: core/models.py:712 msgid "page content" msgstr "contenu de la page" @@ -1009,27 +1030,27 @@ msgstr "Déconnexion" msgid "Search" msgstr "Recherche" -#: core/templates/core/base.jinja:40 core/templates/core/search.jinja:10 +#: core/templates/core/base.jinja:51 core/templates/core/search.jinja:10 msgid "Users" msgstr "Utilisateurs" -#: core/templates/core/base.jinja:41 +#: core/templates/core/base.jinja:52 msgid "Wiki" msgstr "Wiki" -#: core/templates/core/base.jinja:42 +#: core/templates/core/base.jinja:53 msgid "Pages" msgstr "Pages" -#: core/templates/core/base.jinja:43 core/templates/core/search.jinja:18 +#: core/templates/core/base.jinja:54 core/templates/core/search.jinja:18 msgid "Clubs" msgstr "Clubs" -#: core/templates/core/base.jinja:44 +#: core/templates/core/base.jinja:55 msgid "Services" msgstr "Services" -#: core/templates/core/base.jinja:60 +#: core/templates/core/base.jinja:71 msgid "Site made by good people" msgstr "Site réalisé par des gens bons" @@ -1370,6 +1391,10 @@ msgstr "Méthode de paiement" msgid "Account buyings" msgstr "Achat sur compte utilisateur" +#: core/templates/core/user_account.jinja:47 +msgid "Label" +msgstr "Intitulé" + #: core/templates/core/user_account.jinja:48 msgid "Quantity" msgstr "Quantité" @@ -1652,7 +1677,7 @@ 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:283 sith/settings_sample.py:266 +#: sith/settings.py:288 sith/settings_sample.py:271 msgid "Eboutic" msgstr "Eboutic" @@ -1688,9 +1713,9 @@ msgstr "quantité" msgid "Sith account" msgstr "Compte utilisateur" -#: counter/models.py:263 sith/settings.py:276 sith/settings.py:281 -#: sith/settings.py:302 sith/settings_sample.py:259 -#: sith/settings_sample.py:264 sith/settings_sample.py:285 +#: counter/models.py:263 sith/settings.py:281 sith/settings.py:286 +#: sith/settings.py:307 sith/settings_sample.py:264 +#: sith/settings_sample.py:269 sith/settings_sample.py:290 msgid "Credit card" msgstr "Carte banquaire" @@ -2012,12 +2037,12 @@ msgid "Washing and drying" msgstr "Lavage et séchage" #: launderette/templates/launderette/launderette_book.jinja:26 -#: sith/settings.py:412 sith/settings_sample.py:395 +#: sith/settings.py:417 sith/settings_sample.py:400 msgid "Washing" msgstr "Lavage" #: launderette/templates/launderette/launderette_book.jinja:30 -#: sith/settings.py:412 sith/settings_sample.py:395 +#: sith/settings.py:417 sith/settings_sample.py:400 msgid "Drying" msgstr "Séchage" @@ -2072,108 +2097,116 @@ msgstr "L'utilisateur n'a pas réservé de créneau" msgid "Token not found" msgstr "Jeton non trouvé" -#: sith/settings.py:273 sith/settings.py:280 sith/settings.py:300 -#: sith/settings_sample.py:256 sith/settings_sample.py:263 -#: sith/settings_sample.py:283 +#: sith/settings.py:172 sith/settings_sample.py:160 +msgid "English" +msgstr "Anglais" + +#: sith/settings.py:173 sith/settings_sample.py:161 +msgid "French" +msgstr "Français" + +#: sith/settings.py:278 sith/settings.py:285 sith/settings.py:305 +#: sith/settings_sample.py:261 sith/settings_sample.py:268 +#: sith/settings_sample.py:288 msgid "Check" msgstr "Chèque" -#: sith/settings.py:274 sith/settings.py:282 sith/settings.py:301 -#: sith/settings_sample.py:257 sith/settings_sample.py:265 -#: sith/settings_sample.py:284 +#: sith/settings.py:279 sith/settings.py:287 sith/settings.py:306 +#: sith/settings_sample.py:262 sith/settings_sample.py:270 +#: sith/settings_sample.py:289 msgid "Cash" msgstr "Espèces" -#: sith/settings.py:275 sith/settings_sample.py:258 +#: sith/settings.py:280 sith/settings_sample.py:263 msgid "Transfert" msgstr "Virement" -#: sith/settings.py:288 sith/settings_sample.py:271 +#: sith/settings.py:293 sith/settings_sample.py:276 msgid "Belfort" msgstr "Belfort" -#: sith/settings.py:289 sith/settings_sample.py:272 +#: sith/settings.py:294 sith/settings_sample.py:277 msgid "Sevenans" msgstr "Sevenans" -#: sith/settings.py:290 sith/settings_sample.py:273 +#: sith/settings.py:295 sith/settings_sample.py:278 msgid "Montbéliard" msgstr "Montbéliard" -#: sith/settings.py:325 sith/settings_sample.py:308 +#: sith/settings.py:330 sith/settings_sample.py:313 msgid "One semester" msgstr "Un semestre" -#: sith/settings.py:330 sith/settings_sample.py:313 +#: sith/settings.py:335 sith/settings_sample.py:318 msgid "Two semesters" msgstr "Deux semestres" -#: sith/settings.py:335 sith/settings_sample.py:318 +#: sith/settings.py:340 sith/settings_sample.py:323 msgid "Common core cursus" msgstr "Cursus tronc commun" -#: sith/settings.py:340 sith/settings.py:345 sith/settings_sample.py:323 -#: sith/settings_sample.py:328 +#: sith/settings.py:345 sith/settings.py:350 sith/settings_sample.py:328 +#: sith/settings_sample.py:333 msgid "Branch cursus" msgstr "Cursus branche" -#: sith/settings.py:350 sith/settings_sample.py:333 +#: sith/settings.py:355 sith/settings_sample.py:338 msgid "Honorary member" msgstr "Membre honoraire" -#: sith/settings.py:355 sith/settings_sample.py:338 +#: sith/settings.py:360 sith/settings_sample.py:343 msgid "Assidu member" msgstr "Membre d'Assidu" -#: sith/settings.py:360 sith/settings_sample.py:343 +#: sith/settings.py:365 sith/settings_sample.py:348 msgid "Amicale/DOCEO member" msgstr "Membre de l'Amicale/DOCEO" -#: sith/settings.py:365 sith/settings_sample.py:348 +#: sith/settings.py:370 sith/settings_sample.py:353 msgid "UT network member" msgstr "Cotisant du réseau UT" -#: sith/settings.py:370 sith/settings_sample.py:353 +#: sith/settings.py:375 sith/settings_sample.py:358 msgid "CROUS member" msgstr "Membres du CROUS" -#: sith/settings.py:375 sith/settings_sample.py:358 +#: sith/settings.py:380 sith/settings_sample.py:363 msgid "Sbarro/ESTA member" msgstr "Membre de Sbarro ou de l'ESTA" -#: sith/settings.py:383 sith/settings_sample.py:366 +#: sith/settings.py:388 sith/settings_sample.py:371 msgid "President" msgstr "Président" -#: sith/settings.py:384 sith/settings_sample.py:367 +#: sith/settings.py:389 sith/settings_sample.py:372 msgid "Vice-President" msgstr "Vice-Président" -#: sith/settings.py:385 sith/settings_sample.py:368 +#: sith/settings.py:390 sith/settings_sample.py:373 msgid "Treasurer" msgstr "Trésorier" -#: sith/settings.py:386 sith/settings_sample.py:369 +#: sith/settings.py:391 sith/settings_sample.py:374 msgid "Communication supervisor" msgstr "Responsable com" -#: sith/settings.py:387 sith/settings_sample.py:370 +#: sith/settings.py:392 sith/settings_sample.py:375 msgid "Secretary" msgstr "Secrétaire" -#: sith/settings.py:388 sith/settings_sample.py:371 +#: sith/settings.py:393 sith/settings_sample.py:376 msgid "IT supervisor" msgstr "Responsable info" -#: sith/settings.py:389 sith/settings_sample.py:372 +#: sith/settings.py:394 sith/settings_sample.py:377 msgid "Board member" msgstr "Membre du bureau" -#: sith/settings.py:390 sith/settings_sample.py:373 +#: sith/settings.py:395 sith/settings_sample.py:378 msgid "Active member" msgstr "Membre actif" -#: sith/settings.py:391 sith/settings_sample.py:374 +#: sith/settings.py:396 sith/settings_sample.py:379 msgid "Curious" msgstr "Curieux" @@ -2218,5 +2251,3 @@ msgid "You must either choose an existing user or create a new one properly" msgstr "" "Vous devez soit choisir un utilisateur existant, ou en créer un proprement." -#~ msgid "remark" -#~ msgstr "remarque" diff --git a/migrate.py b/migrate.py index 327bf39e..f86bcf03 100644 --- a/migrate.py +++ b/migrate.py @@ -730,10 +730,18 @@ def migrate_operations(): 0: "CASH", None: "CASH", } + MOVEMENT_TYPE = { + -1: "DEBIT", + 0: "NEUTRAL", + 1: "CREDIT", + None: "NEUTRAL", + } cur = db.cursor(MySQLdb.cursors.SSDictCursor) cur.execute(""" SELECT * - FROM cpta_operation + FROM cpta_operation op + LEFT JOIN cpta_op_clb clb + ON op.id_opclb = clb.id_opclb """) Operation.objects.all().delete() print("Operation deleted") @@ -748,7 +756,7 @@ def migrate_operations(): if not accounting_type and simple_type: accounting_type = simple_type.accounting_type if not accounting_type: - accounting_type = AccountingType.objects.filter(movement_type="NEUTRAL").first() + accounting_type = AccountingType.objects.filter(movement_type=MOVEMENT_TYPE[r['type_mouvement']]).first() journal = GeneralJournal.objects.filter(id=r['id_classeur']).first() def get_target_type(): if r['id_utilisateur']: @@ -808,35 +816,39 @@ def make_operation_links(): def main(): start = datetime.datetime.now() print("Start at %s" % start) - # migrate_users() - # migrate_profile_pict() - # migrate_clubs() - # migrate_club_memberships() - # migrate_subscriptions() - # update_customer_account() - # migrate_counters() - # migrate_permanencies() - # migrate_typeproducts() - # migrate_products() - # migrate_product_pict() - # migrate_products_to_counter() - # reset_customer_amount() - # migrate_invoices() - # migrate_refillings() - # migrate_sellings() - # reset_index('core', 'club', 'subscription', 'accounting', 'eboutic', 'launderette', 'counter') - # migrate_accounting_types() - # migrate_simpleaccounting_types() - # migrate_bank_accounts() - # migrate_club_accounts() - # migrate_journals() - # migrate_operations() + # Core + migrate_users() + migrate_profile_pict() + # Club + migrate_clubs() + migrate_club_memberships() + # Subscriptions + migrate_subscriptions() + # Counters + update_customer_account() + migrate_counters() + migrate_permanencies() + migrate_typeproducts() + migrate_products() + migrate_product_pict() + migrate_products_to_counter() + reset_customer_amount() + migrate_invoices() + reset_index('counter') + migrate_refillings() + migrate_sellings() + # Accounting + migrate_accounting_types() + migrate_simpleaccounting_types() + migrate_bank_accounts() + migrate_club_accounts() + migrate_journals() + migrate_operations() make_operation_links() + reset_index('core', 'club', 'subscription', 'accounting', 'eboutic', 'launderette', 'counter') end = datetime.datetime.now() print("End at %s" % end) print("Running time: %s" % (end-start)) - - if __name__ == "__main__": main()