Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nounous
re2o
Commits
e5789dbe
Commit
e5789dbe
authored
Jul 13, 2018
by
Hugo LEVY-FALK
Browse files
Fix le paiement par cheque
parent
241af302
Changes
2
Hide whitespace changes
Inline
Side-by-side
cotisations/payment_methods/cheque/views.py
View file @
e5789dbe
...
@@ -30,6 +30,7 @@ from django.contrib import messages
...
@@ -30,6 +30,7 @@ from django.contrib import messages
from
django.utils.translation
import
ugettext
as
_
from
django.utils.translation
import
ugettext
as
_
from
cotisations.models
import
Facture
as
Invoice
from
cotisations.models
import
Facture
as
Invoice
from
cotisations.utils
import
find_payment_method
from
.models
import
ChequePayment
from
.models
import
ChequePayment
from
.forms
import
InvoiceForm
from
.forms
import
InvoiceForm
...
@@ -39,7 +40,7 @@ from .forms import InvoiceForm
...
@@ -39,7 +40,7 @@ from .forms import InvoiceForm
def
cheque
(
request
,
invoice_pk
):
def
cheque
(
request
,
invoice_pk
):
"""This view validate an invoice with the data from a cheque."""
"""This view validate an invoice with the data from a cheque."""
invoice
=
get_object_or_404
(
Invoice
,
pk
=
invoice_pk
)
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
):
if
invoice
.
valid
or
not
isinstance
(
payment_method
,
ChequePayment
):
messages
.
error
(
messages
.
error
(
request
,
request
,
...
...
cotisations/views.py
View file @
e5789dbe
...
@@ -479,7 +479,6 @@ def edit_paiement(request, paiement_instance, **_kwargs):
...
@@ -479,7 +479,6 @@ def edit_paiement(request, paiement_instance, **_kwargs):
'title'
:
_
(
"Edit payment method"
)
'title'
:
_
(
"Edit payment method"
)
},
'cotisations/facture.html'
,
request
)
},
'cotisations/facture.html'
,
request
)
'title'
:
_
(
"New payment method"
)
# TODO : change paiement to payment
# TODO : change paiement to payment
@
login_required
@
login_required
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment