8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-08-19 21:53:41 +00:00

Fix le paiement par cheque

This commit is contained in:
Hugo LEVY-FALK 2018-07-13 22:28:10 +02:00
parent 241af30211
commit e5789dbe03
2 changed files with 2 additions and 2 deletions

View file

@ -30,6 +30,7 @@ from django.contrib import messages
from django.utils.translation import ugettext as _
from cotisations.models import Facture as Invoice
from cotisations.utils import find_payment_method
from .models import ChequePayment
from .forms import InvoiceForm
@ -39,7 +40,7 @@ from .forms import InvoiceForm
def cheque(request, invoice_pk):
"""This view validate an invoice with the data from a cheque."""
invoice = get_object_or_404(Invoice, pk=invoice_pk)
payment_method = getattr(invoice.paiement, 'payment_method', None)
payment_method = find_payment_method(invoice.paiement)
if invoice.valid or not isinstance(payment_method, ChequePayment):
messages.error(
request,

View file

@ -479,7 +479,6 @@ def edit_paiement(request, paiement_instance, **_kwargs):
'title': _("Edit payment method")
}, 'cotisations/facture.html', request)
'title': _("New payment method")
# TODO : change paiement to payment
@login_required