mirror of https://gitlab.federez.net/re2o/re2o
20 changed files with 294 additions and 395 deletions
@ -1,29 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
# Generated by Django 1.10.7 on 2019-01-03 16:48 |
|
||||
from __future__ import unicode_literals |
|
||||
|
|
||||
from django.db import migrations, models |
|
||||
import re2o.mixins |
|
||||
|
|
||||
|
|
||||
class Migration(migrations.Migration): |
|
||||
|
|
||||
dependencies = [ |
|
||||
('cotisations', '0038_auto_20181231_1657'), |
|
||||
] |
|
||||
|
|
||||
operations = [ |
|
||||
migrations.CreateModel( |
|
||||
name='DocumentTemplate', |
|
||||
fields=[ |
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|
||||
('template', models.FileField(upload_to='templates/', verbose_name='template')), |
|
||||
('name', models.CharField(max_length=255, verbose_name='name')), |
|
||||
], |
|
||||
options={ |
|
||||
'verbose_name_plural': 'document templates', |
|
||||
'verbose_name': 'document template', |
|
||||
}, |
|
||||
bases=(re2o.mixins.RevMixin, re2o.mixins.AclMixin, models.Model), |
|
||||
), |
|
||||
] |
|
||||
@ -1,20 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
# Generated by Django 1.10.7 on 2019-01-20 23:08 |
|
||||
from __future__ import unicode_literals |
|
||||
|
|
||||
from django.db import migrations, models |
|
||||
|
|
||||
|
|
||||
class Migration(migrations.Migration): |
|
||||
|
|
||||
dependencies = [ |
|
||||
('cotisations', '0039_documenttemplate'), |
|
||||
] |
|
||||
|
|
||||
operations = [ |
|
||||
migrations.AlterField( |
|
||||
model_name='documenttemplate', |
|
||||
name='name', |
|
||||
field=models.CharField(max_length=125, unique=True, verbose_name='name'), |
|
||||
), |
|
||||
] |
|
||||
@ -1,42 +0,0 @@ |
|||||
{% extends "cotisations/sidebar.html" %} |
|
||||
{% comment %} |
|
||||
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 © 2019 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. |
|
||||
{% endcomment %} |
|
||||
|
|
||||
{% load bootstrap3 %} |
|
||||
{% load acl %} |
|
||||
{% load i18n %} |
|
||||
|
|
||||
{% block title %}{% trans "Document Templates" %}{% endblock %} |
|
||||
|
|
||||
{% block content %} |
|
||||
<h2>{% trans "Document templates list" %}</h2> |
|
||||
{% can_create Banque %} |
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:add-document-template' %}"> |
|
||||
<i class="fa fa-cart-plus"></i> {% trans "Add a document template" %} |
|
||||
</a> |
|
||||
{% acl_end %} |
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'cotisations:del-document-template' %}"> |
|
||||
<i class="fa fa-trash"></i> {% trans "Delete one or several document templates" %} |
|
||||
</a> |
|
||||
{% include 'cotisations/aff_document_template.html' %} |
|
||||
{% endblock %} |
|
||||
|
|
||||
@ -0,0 +1,62 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.10.7 on 2019-01-20 23:39 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
import preferences.models |
||||
|
import re2o.mixins |
||||
|
|
||||
|
|
||||
|
def create_defaults(apps, schema_editor): |
||||
|
CotisationsOption = apps.get_model('preferences', 'CotisationsOption') |
||||
|
CotisationsOption.objects.get_or_create() |
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('preferences', '0058_auto_20190108_1650'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.CreateModel( |
||||
|
name='CotisationsOption', |
||||
|
fields=[ |
||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
|
('send_voucher_mail', models.BooleanField(default=False, verbose_name='Send voucher by email when the invoice is controlled.')), |
||||
|
], |
||||
|
options={ |
||||
|
'verbose_name': 'cotisations options', |
||||
|
}, |
||||
|
bases=(re2o.mixins.AclMixin, models.Model), |
||||
|
), |
||||
|
migrations.CreateModel( |
||||
|
name='DocumentTemplate', |
||||
|
fields=[ |
||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
|
('template', models.FileField(upload_to='templates/', verbose_name='template')), |
||||
|
('name', models.CharField(max_length=125, unique=True, verbose_name='name')), |
||||
|
], |
||||
|
options={ |
||||
|
'verbose_name': 'document template', |
||||
|
'verbose_name_plural': 'document templates', |
||||
|
}, |
||||
|
bases=(re2o.mixins.RevMixin, re2o.mixins.AclMixin, models.Model), |
||||
|
), |
||||
|
migrations.AddField( |
||||
|
model_name='assooption', |
||||
|
name='pres_name', |
||||
|
field=models.CharField(default='', help_text='Displayed on subscription vouchers', max_length=255, verbose_name='President of the association'), |
||||
|
), |
||||
|
migrations.AddField( |
||||
|
model_name='cotisationsoption', |
||||
|
name='invoice_template', |
||||
|
field=models.OneToOneField(default=preferences.models.default_invoice, on_delete=django.db.models.deletion.PROTECT, related_name='invoice_template', to='preferences.DocumentTemplate', verbose_name='Template for invoices'), |
||||
|
), |
||||
|
migrations.AddField( |
||||
|
model_name='cotisationsoption', |
||||
|
name='voucher_template', |
||||
|
field=models.OneToOneField(default=preferences.models.default_voucher, on_delete=django.db.models.deletion.PROTECT, related_name='voucher_template', to='preferences.DocumentTemplate', verbose_name='Template for subscription voucher'), |
||||
|
), |
||||
|
migrations.RunPython(create_defaults), |
||||
|
] |
||||
@ -1,37 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
# Generated by Django 1.10.7 on 2019-01-03 19:56 |
|
||||
from __future__ import unicode_literals |
|
||||
|
|
||||
from django.db import migrations, models |
|
||||
import django.db.models.deletion |
|
||||
import re2o.mixins |
|
||||
import preferences.models |
|
||||
|
|
||||
|
|
||||
def initialize_invoice_template(apps, schema_editor): |
|
||||
CotisationsOption = apps.get_model('preferences', 'CotisationsOption') |
|
||||
CotisationsOption.objects.get_or_create() |
|
||||
|
|
||||
|
|
||||
class Migration(migrations.Migration): |
|
||||
|
|
||||
dependencies = [ |
|
||||
('cotisations', '0039_documenttemplate'), |
|
||||
('preferences', '0058_auto_20190108_1650'), |
|
||||
] |
|
||||
|
|
||||
operations = [ |
|
||||
migrations.CreateModel( |
|
||||
name='CotisationsOption', |
|
||||
fields=[ |
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|
||||
('invoice_template', models.OneToOneField(default=preferences.models.default_invoice,on_delete=django.db.models.deletion.PROTECT, related_name='invoice_template', to='cotisations.DocumentTemplate', verbose_name='Template for invoices')), |
|
||||
('voucher_template', models.OneToOneField(default=preferences.models.default_voucher, on_delete=django.db.models.deletion.PROTECT, related_name='voucher_template', to='cotisations.DocumentTemplate', verbose_name='Template for subscription voucher')), |
|
||||
], |
|
||||
options={ |
|
||||
'verbose_name': 'cotisations options', |
|
||||
}, |
|
||||
bases=(re2o.mixins.AclMixin, models.Model), |
|
||||
), |
|
||||
migrations.RunPython(initialize_invoice_template), |
|
||||
] |
|
||||
@ -1,20 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
# Generated by Django 1.10.7 on 2019-01-10 22:13 |
|
||||
from __future__ import unicode_literals |
|
||||
|
|
||||
from django.db import migrations, models |
|
||||
|
|
||||
|
|
||||
class Migration(migrations.Migration): |
|
||||
|
|
||||
dependencies = [ |
|
||||
('preferences', '0059_cotisationsoption'), |
|
||||
] |
|
||||
|
|
||||
operations = [ |
|
||||
migrations.AddField( |
|
||||
model_name='assooption', |
|
||||
name='pres_name', |
|
||||
field=models.CharField(default='', help_text='Displayed on subscription vouchers', max_length=255, verbose_name='President of the association'), |
|
||||
), |
|
||||
] |
|
||||
@ -1,20 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
# Generated by Django 1.10.7 on 2019-01-20 18:03 |
|
||||
from __future__ import unicode_literals |
|
||||
|
|
||||
from django.db import migrations, models |
|
||||
|
|
||||
|
|
||||
class Migration(migrations.Migration): |
|
||||
|
|
||||
dependencies = [ |
|
||||
('preferences', '0060_assooption_pres_name'), |
|
||||
] |
|
||||
|
|
||||
operations = [ |
|
||||
migrations.AddField( |
|
||||
model_name='cotisationsoption', |
|
||||
name='send_voucher_mail', |
|
||||
field=models.BooleanField(default=False, verbose_name='Send voucher by email when the invoice is controlled.'), |
|
||||
), |
|
||||
] |
|
||||
Loading…
Reference in new issue