8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-26 22:52:26 +00:00

Renomage, les groupes unix doivent etre unicode

This commit is contained in:
Gabriel Detraz 2017-10-03 05:51:14 +02:00 committed by root
parent c3d0ad1dea
commit cda44cdf2a
3 changed files with 14 additions and 14 deletions

View file

@ -109,7 +109,7 @@ def new_facture(request, userid):
return form({'factureform': facture_form, 'venteform': article_formset, 'articlelist': article_list}, 'cotisations/new_facture.html', request) return form({'factureform': facture_form, 'venteform': article_formset, 'articlelist': article_list}, 'cotisations/new_facture.html', request)
@login_required @login_required
@permission_required('trésorier') @permission_required('tresorier')
def new_facture_pdf(request): def new_facture_pdf(request):
facture_form = NewFactureFormPdf(request.POST or None) facture_form = NewFactureFormPdf(request.POST or None)
if facture_form.is_valid(): if facture_form.is_valid():
@ -156,7 +156,7 @@ def edit_facture(request, factureid):
except Facture.DoesNotExist: except Facture.DoesNotExist:
messages.error(request, u"Facture inexistante" ) messages.error(request, u"Facture inexistante" )
return redirect("/cotisations/") return redirect("/cotisations/")
if request.user.has_perms(['trésorier']): if request.user.has_perms(['tresorier']):
facture_form = TrezEditFactureForm(request.POST or None, instance=facture) facture_form = TrezEditFactureForm(request.POST or None, instance=facture)
elif facture.control or not facture.valid: elif facture.control or not facture.valid:
messages.error(request, "Vous ne pouvez pas editer une facture controlée ou invalidée par le trésorier") messages.error(request, "Vous ne pouvez pas editer une facture controlée ou invalidée par le trésorier")
@ -223,7 +223,7 @@ def credit_solde(request, userid):
@login_required @login_required
@permission_required('trésorier') @permission_required('tresorier')
def add_article(request): def add_article(request):
article = ArticleForm(request.POST or None) article = ArticleForm(request.POST or None)
if article.is_valid(): if article.is_valid():
@ -236,7 +236,7 @@ def add_article(request):
return form({'factureform': article}, 'cotisations/facture.html', request) return form({'factureform': article}, 'cotisations/facture.html', request)
@login_required @login_required
@permission_required('trésorier') @permission_required('tresorier')
def edit_article(request, articleid): def edit_article(request, articleid):
try: try:
article_instance = Article.objects.get(pk=articleid) article_instance = Article.objects.get(pk=articleid)
@ -254,7 +254,7 @@ def edit_article(request, articleid):
return form({'factureform': article}, 'cotisations/facture.html', request) return form({'factureform': article}, 'cotisations/facture.html', request)
@login_required @login_required
@permission_required('trésorier') @permission_required('tresorier')
def del_article(request): def del_article(request):
article = DelArticleForm(request.POST or None) article = DelArticleForm(request.POST or None)
if article.is_valid(): if article.is_valid():
@ -267,7 +267,7 @@ def del_article(request):
return form({'factureform': article}, 'cotisations/facture.html', request) return form({'factureform': article}, 'cotisations/facture.html', request)
@login_required @login_required
@permission_required('trésorier') @permission_required('tresorier')
def add_paiement(request): def add_paiement(request):
paiement = PaiementForm(request.POST or None) paiement = PaiementForm(request.POST or None)
if paiement.is_valid(): if paiement.is_valid():
@ -280,7 +280,7 @@ def add_paiement(request):
return form({'factureform': paiement}, 'cotisations/facture.html', request) return form({'factureform': paiement}, 'cotisations/facture.html', request)
@login_required @login_required
@permission_required('trésorier') @permission_required('tresorier')
def edit_paiement(request, paiementid): def edit_paiement(request, paiementid):
try: try:
paiement_instance = Paiement.objects.get(pk=paiementid) paiement_instance = Paiement.objects.get(pk=paiementid)
@ -298,7 +298,7 @@ def edit_paiement(request, paiementid):
return form({'factureform': paiement}, 'cotisations/facture.html', request) return form({'factureform': paiement}, 'cotisations/facture.html', request)
@login_required @login_required
@permission_required('trésorier') @permission_required('tresorier')
def del_paiement(request): def del_paiement(request):
paiement = DelPaiementForm(request.POST or None) paiement = DelPaiementForm(request.POST or None)
if paiement.is_valid(): if paiement.is_valid():
@ -329,7 +329,7 @@ def add_banque(request):
return form({'factureform': banque}, 'cotisations/facture.html', request) return form({'factureform': banque}, 'cotisations/facture.html', request)
@login_required @login_required
@permission_required('trésorier') @permission_required('tresorier')
def edit_banque(request, banqueid): def edit_banque(request, banqueid):
try: try:
banque_instance = Banque.objects.get(pk=banqueid) banque_instance = Banque.objects.get(pk=banqueid)
@ -347,7 +347,7 @@ def edit_banque(request, banqueid):
return form({'factureform': banque}, 'cotisations/facture.html', request) return form({'factureform': banque}, 'cotisations/facture.html', request)
@login_required @login_required
@permission_required('trésorier') @permission_required('tresorier')
def del_banque(request): def del_banque(request):
banque = DelBanqueForm(request.POST or None) banque = DelBanqueForm(request.POST or None)
if banque.is_valid(): if banque.is_valid():
@ -365,7 +365,7 @@ def del_banque(request):
return form({'factureform': banque}, 'cotisations/facture.html', request) return form({'factureform': banque}, 'cotisations/facture.html', request)
@login_required @login_required
@permission_required('trésorier') @permission_required('tresorier')
def control(request): def control(request):
options, created = GeneralOption.objects.get_or_create() options, created = GeneralOption.objects.get_or_create()
pagination_number = options.pagination_number pagination_number = options.pagination_number

View file

@ -157,8 +157,8 @@ STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static_files') STATIC_ROOT = os.path.join(BASE_DIR, 'static_files')
RIGHTS_LINK = { RIGHTS_LINK = {
'cableur' : ['bureau','infra','bofh','trésorier'], 'cableur' : ['bureau','infra','bofh','tresorier'],
'bofh' : ['bureau','trésorier'], 'bofh' : ['bureau','tresorier'],
} }
GRAPH_MODELS = { GRAPH_MODELS = {

View file

@ -253,7 +253,7 @@ class User(AbstractBaseUser):
@cached_property @cached_property
def is_trez(self): def is_trez(self):
return self.has_right('trésorier') return self.has_right('tresorier')
@cached_property @cached_property
def is_infra(self): def is_infra(self):