mirror of https://gitlab.federez.net/re2o/re2o
759 changed files with 26819 additions and 16455 deletions
File diff suppressed because it is too large
@ -0,0 +1,23 @@ |
|||||
|
python-django |
||||
|
python-dateutil |
||||
|
texlive-latex-base |
||||
|
texlive-fonts-recommended |
||||
|
python-djangorestframework |
||||
|
python-django-reversion |
||||
|
python-pip |
||||
|
libsasl2-dev libldap2-dev |
||||
|
libssl-dev |
||||
|
python-crypto |
||||
|
python-git |
||||
|
javascript-common |
||||
|
libjs-jquery |
||||
|
libjs-jquery-ui |
||||
|
libjs-jquery-timepicker |
||||
|
libjs-bootstrap |
||||
|
fonts-font-awesome |
||||
|
graphviz |
||||
|
git |
||||
|
gettext |
||||
|
freeradius-common |
||||
|
freeradius-python2 |
||||
|
python-mysqldb |
||||
File diff suppressed because it is too large
@ -0,0 +1,40 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.11.23 on 2019-09-30 09:19 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
import cotisations.payment_methods.mixins |
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [("cotisations", "0038_auto_20181231_1657")] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.CreateModel( |
||||
|
name="FreePayment", |
||||
|
fields=[ |
||||
|
( |
||||
|
"id", |
||||
|
models.AutoField( |
||||
|
auto_created=True, |
||||
|
primary_key=True, |
||||
|
serialize=False, |
||||
|
verbose_name="ID", |
||||
|
), |
||||
|
), |
||||
|
( |
||||
|
"payment", |
||||
|
models.OneToOneField( |
||||
|
editable=False, |
||||
|
on_delete=django.db.models.deletion.CASCADE, |
||||
|
related_name="payment_method", |
||||
|
to="cotisations.Paiement", |
||||
|
), |
||||
|
), |
||||
|
], |
||||
|
options={"verbose_name": "Free payment"}, |
||||
|
bases=(cotisations.payment_methods.mixins.PaymentMethodMixin, models.Model), |
||||
|
) |
||||
|
] |
||||
@ -0,0 +1,34 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.11.23 on 2019-10-02 21:35 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
import django.core.validators |
||||
|
from django.db import migrations, models |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [("cotisations", "0039_freepayment")] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.AddField( |
||||
|
model_name="article", |
||||
|
name="duration_days", |
||||
|
field=models.PositiveIntegerField( |
||||
|
blank=True, |
||||
|
null=True, |
||||
|
validators=[django.core.validators.MinValueValidator(0)], |
||||
|
verbose_name="duration (in days, will be added to duration in months)", |
||||
|
), |
||||
|
), |
||||
|
migrations.AddField( |
||||
|
model_name="vente", |
||||
|
name="duration_days", |
||||
|
field=models.PositiveIntegerField( |
||||
|
blank=True, |
||||
|
null=True, |
||||
|
validators=[django.core.validators.MinValueValidator(0)], |
||||
|
verbose_name="duration (in days, will be added to duration in months)", |
||||
|
), |
||||
|
), |
||||
|
] |
||||
@ -0,0 +1,64 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.11.23 on 2019-11-03 20:31 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [("cotisations", "0040_auto_20191002_2335")] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.AlterField( |
||||
|
model_name="balancepayment", |
||||
|
name="payment", |
||||
|
field=models.OneToOneField( |
||||
|
editable=False, |
||||
|
on_delete=django.db.models.deletion.CASCADE, |
||||
|
related_name="payment_method_balance", |
||||
|
to="cotisations.Paiement", |
||||
|
), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name="chequepayment", |
||||
|
name="payment", |
||||
|
field=models.OneToOneField( |
||||
|
editable=False, |
||||
|
on_delete=django.db.models.deletion.CASCADE, |
||||
|
related_name="payment_method_cheque", |
||||
|
to="cotisations.Paiement", |
||||
|
), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name="comnpaypayment", |
||||
|
name="payment", |
||||
|
field=models.OneToOneField( |
||||
|
editable=False, |
||||
|
on_delete=django.db.models.deletion.CASCADE, |
||||
|
related_name="payment_method_comnpay", |
||||
|
to="cotisations.Paiement", |
||||
|
), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name="freepayment", |
||||
|
name="payment", |
||||
|
field=models.OneToOneField( |
||||
|
editable=False, |
||||
|
on_delete=django.db.models.deletion.CASCADE, |
||||
|
related_name="payment_method_free", |
||||
|
to="cotisations.Paiement", |
||||
|
), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name="notepayment", |
||||
|
name="payment", |
||||
|
field=models.OneToOneField( |
||||
|
editable=False, |
||||
|
on_delete=django.db.models.deletion.CASCADE, |
||||
|
related_name="payment_method_note", |
||||
|
to="cotisations.Paiement", |
||||
|
), |
||||
|
), |
||||
|
] |
||||
@ -0,0 +1,79 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.11.23 on 2019-11-20 00:59 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('cotisations', '0041_auto_20191103_2131'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.AlterModelOptions( |
||||
|
name='chequepayment', |
||||
|
options={'verbose_name': 'cheque'}, |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='balancepayment', |
||||
|
name='credit_balance_allowed', |
||||
|
field=models.BooleanField(default=False, verbose_name='allow user to credit their balance'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='balancepayment', |
||||
|
name='maximum_balance', |
||||
|
field=models.DecimalField(blank=True, decimal_places=2, default=50, help_text='The maximal amount of money allowed for the balance.', max_digits=5, null=True, verbose_name='maximum balance'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='balancepayment', |
||||
|
name='minimum_balance', |
||||
|
field=models.DecimalField(decimal_places=2, default=0, help_text='The minimal amount of money allowed for the balance at the end of a payment. You can specify a negative amount.', max_digits=5, verbose_name='minimum balance'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='baseinvoice', |
||||
|
name='date', |
||||
|
field=models.DateTimeField(auto_now_add=True, verbose_name='date'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='comnpaypayment', |
||||
|
name='minimum_payment', |
||||
|
field=models.DecimalField(decimal_places=2, default=1, help_text='The minimal amount of money you have to use when paying with ComNpay.', max_digits=5, verbose_name='minimum payment'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='comnpaypayment', |
||||
|
name='production', |
||||
|
field=models.BooleanField(default=True, verbose_name='production mode enabled (production URL, instead of homologation)'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='costestimate', |
||||
|
name='validity', |
||||
|
field=models.DurationField(help_text='DD HH:MM:SS', verbose_name='period of validity'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='custominvoice', |
||||
|
name='address', |
||||
|
field=models.CharField(max_length=255, verbose_name='address'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='custominvoice', |
||||
|
name='paid', |
||||
|
field=models.BooleanField(default=False, verbose_name='paid'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='custominvoice', |
||||
|
name='payment', |
||||
|
field=models.CharField(max_length=255, verbose_name='payment type'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='custominvoice', |
||||
|
name='recipient', |
||||
|
field=models.CharField(max_length=255, verbose_name='recipient'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='custominvoice', |
||||
|
name='remark', |
||||
|
field=models.TextField(blank=True, null=True, verbose_name='remark'), |
||||
|
), |
||||
|
] |
||||
File diff suppressed because it is too large
@ -0,0 +1,54 @@ |
|||||
|
# -*- mode: python; coding: utf-8 -*- |
||||
|
# Re2o est un logiciel d'administration développé initiallement au rezometz. Il |
||||
|
# se veut agnostique au réseau considéré, de manière à être installable en |
||||
|
# quelques clics. |
||||
|
# |
||||
|
# Copyright © 2018 Hugo Levy-Falk |
||||
|
# |
||||
|
# This program is free software; you can redistribute it and/or modify |
||||
|
# it under the terms of the GNU General Public License as published by |
||||
|
# the Free Software Foundation; either version 2 of the License, or |
||||
|
# (at your option) any later version. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU General Public License for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU General Public License along |
||||
|
# with this program; if not, write to the Free Software Foundation, Inc., |
||||
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||||
|
from django.db import models |
||||
|
from django.utils.translation import ugettext_lazy as _ |
||||
|
from django.contrib import messages |
||||
|
|
||||
|
|
||||
|
from cotisations.models import Paiement |
||||
|
from cotisations.payment_methods.mixins import PaymentMethodMixin |
||||
|
|
||||
|
|
||||
|
class FreePayment(PaymentMethodMixin, models.Model): |
||||
|
""" |
||||
|
The model allowing you to bypass payment if the invoice is free. |
||||
|
""" |
||||
|
|
||||
|
class Meta: |
||||
|
verbose_name = _("Free payment") |
||||
|
|
||||
|
payment = models.OneToOneField( |
||||
|
Paiement, |
||||
|
on_delete=models.CASCADE, |
||||
|
related_name="payment_method_free", |
||||
|
editable=False, |
||||
|
) |
||||
|
|
||||
|
def end_payment(self, invoice, request): |
||||
|
"""Ends the payment normally. |
||||
|
""" |
||||
|
return invoice.paiement.end_payment(invoice, request, use_payment_method=False) |
||||
|
|
||||
|
def check_price(self, price, user, *args, **kwargs): |
||||
|
"""Checks that the price meets the requirement to be paid with user |
||||
|
balance. |
||||
|
""" |
||||
|
return (price == 0, _("You can't pay this invoice for free.")) |
||||
@ -1,22 +1,23 @@ |
|||||
Bonjour {{name}} ! |
Bonjour {{name}} ! |
||||
|
|
||||
Nous vous informons que votre cotisation auprès de {{asso_name}} a été acceptée. Vous voilà donc membre de l'association. |
Nous vous informons que votre cotisation auprès de {{asso_name}} a été acceptée. Vous voilà donc membre de l'association jusqu'au {{ date_end|date:"d/m/Y" }}. |
||||
|
|
||||
Vous trouverez en pièce jointe un reçu. |
Vous trouverez en pièce jointe un reçu. |
||||
|
|
||||
Pour nous faire part de toute remarque, suggestion ou problème vous pouvez nous envoyer un mail à {{asso_email}}. |
Pour nous faire part de toute remarque, suggestion ou problème vous pouvez nous envoyer un mail à {{asso_email}}. |
||||
|
|
||||
À bientôt, |
Respectueusement, |
||||
L'équipe de {{asso_name}}. |
L'équipe de {{asso_name}}. |
||||
|
|
||||
--- |
--- |
||||
|
|
||||
Your subscription to {{asso_name}} has just been accepted. You are now a full member of {{asso_name}}. |
Hello {{name}}! |
||||
|
|
||||
|
Your subscription to {{asso_name}} has just been accepted. You are now a full member of {{asso_name}} until {{ date_end|date:"d/m/Y" }}. |
||||
|
|
||||
You will find with this email a subscription voucher. |
You will find with this email a subscription voucher. |
||||
|
|
||||
For any information, suggestion or problem, you can contact us via email at |
To express any comment, suggestion or problem, you can send us an email to {{asso_email}}. |
||||
{{asso_email}}. |
|
||||
|
|
||||
Regards, |
Regards, |
||||
The {{asso_name}} team. |
The {{asso_name}} team. |
||||
|
|||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue