admin.py 2.36 KB
Newer Older
1
# -*- mode: python; coding: utf-8 -*-
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# 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 © 2017  Gabriel Détraz
# Copyright © 2017  Goulven Kermarec
# Copyright © 2017  Augustin Lemesle
#
# 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.
23 24 25
"""cotisations.admin
The objects, fields and datastructures visible in the Django admin view
"""
26

27 28
from __future__ import unicode_literals

29
from django.contrib import admin
30
from reversion.admin import VersionAdmin
31

32
from .models import Facture, Article, Banque, Paiement, Cotisation, Vente
Levy--Falk Hugo's avatar
Levy--Falk Hugo committed
33
from .models import CustomInvoice
34

chirac's avatar
chirac committed
35

36
class FactureAdmin(VersionAdmin):
37
    """Class admin d'une facture, tous les champs"""
chirac's avatar
chirac committed
38 39
    pass

40

Levy--Falk Hugo's avatar
Levy--Falk Hugo committed
41 42 43 44 45
class CustomInvoiceAdmin(VersionAdmin):
    """Admin class for custom invoices."""
    pass


46
class VenteAdmin(VersionAdmin):
47
    """Class admin d'une vente, tous les champs (facture related)"""
chirac's avatar
chirac committed
48 49
    pass

50

51
class ArticleAdmin(VersionAdmin):
52
    """Class admin d'un article en vente"""
chirac's avatar
chirac committed
53 54
    pass

55

56
class BanqueAdmin(VersionAdmin):
57
    """Class admin de la liste des banques (facture related)"""
chirac's avatar
chirac committed
58 59
    pass

60

61
class PaiementAdmin(VersionAdmin):
62
    """Class admin d'un moyen de paiement (facture related"""
chirac's avatar
chirac committed
63 64
    pass

65

66
class CotisationAdmin(VersionAdmin):
67 68
    """Class admin d'une cotisation (date de debut et de fin),
    Vente related"""
chirac's avatar
chirac committed
69 70
    pass

71

72 73 74 75
admin.site.register(Facture, FactureAdmin)
admin.site.register(Article, ArticleAdmin)
admin.site.register(Banque, BanqueAdmin)
admin.site.register(Paiement, PaiementAdmin)
76
admin.site.register(Vente, VenteAdmin)
77
admin.site.register(Cotisation, CotisationAdmin)
Levy--Falk Hugo's avatar
Levy--Falk Hugo committed
78
admin.site.register(CustomInvoice, CustomInvoiceAdmin)