admin.py 2.52 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.
moamoak's avatar
moamoak committed
23 24 25
"""cotisations.admin
The objects, fields and datastructures visible in the Django admin view
"""
26

27 28
from __future__ import unicode_literals

chirac's avatar
chirac committed
29
from django.contrib import admin
30
from reversion.admin import VersionAdmin
chirac's avatar
chirac committed
31

32
from .models import Facture, Article, Banque, Paiement, Cotisation, Vente
klafyvel's avatar
klafyvel committed
33
from .models import CustomInvoice, CostEstimate
34

chirac's avatar
chirac committed
35

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

40

klafyvel's avatar
klafyvel committed
41 42 43 44 45
class CostEstimateAdmin(VersionAdmin):
    """Admin class for cost estimates."""
    pass


klafyvel's avatar
klafyvel committed
46 47 48 49 50
class CustomInvoiceAdmin(VersionAdmin):
    """Admin class for custom invoices."""
    pass


51
class VenteAdmin(VersionAdmin):
chirac's avatar
chirac committed
52
    """Class admin d'une vente, tous les champs (facture related)"""
chirac's avatar
chirac committed
53 54
    pass

55

56
class ArticleAdmin(VersionAdmin):
chirac's avatar
chirac committed
57
    """Class admin d'un article en vente"""
chirac's avatar
chirac committed
58 59
    pass

60

61
class BanqueAdmin(VersionAdmin):
chirac's avatar
chirac committed
62
    """Class admin de la liste des banques (facture related)"""
chirac's avatar
chirac committed
63 64
    pass

65

66
class PaiementAdmin(VersionAdmin):
chirac's avatar
chirac committed
67
    """Class admin d'un moyen de paiement (facture related"""
chirac's avatar
chirac committed
68 69
    pass

70

71
class CotisationAdmin(VersionAdmin):
chirac's avatar
chirac committed
72 73
    """Class admin d'une cotisation (date de debut et de fin),
    Vente related"""
chirac's avatar
chirac committed
74 75
    pass

76

77 78 79 80
admin.site.register(Facture, FactureAdmin)
admin.site.register(Article, ArticleAdmin)
admin.site.register(Banque, BanqueAdmin)
admin.site.register(Paiement, PaiementAdmin)
81
admin.site.register(Vente, VenteAdmin)
82
admin.site.register(Cotisation, CotisationAdmin)
klafyvel's avatar
klafyvel committed
83
admin.site.register(CustomInvoice, CustomInvoiceAdmin)
klafyvel's avatar
klafyvel committed
84
admin.site.register(CostEstimate, CostEstimateAdmin)