8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 07:23:46 +00:00

Suppression totale des types cheque etc

This commit is contained in:
Hugo LEVY-FALK 2018-07-13 17:40:15 +02:00
parent 8061c3283c
commit 8c985a6e3a

View file

@ -649,17 +649,6 @@ class Paiement(RevMixin, AclMixin, models.Model):
"""
self.moyen = self.moyen.title()
def save(self, *args, **kwargs):
"""
Override of the herited save function to be sure only one payment
method of type 'cheque' exists.
"""
if Paiement.objects.filter(type_paiement=1).count() > 1:
raise ValidationError(
_("You cannot have multiple payment method of type cheque")
)
super(Paiement, self).save(*args, **kwargs)
def end_payment(self, invoice, request, use_payment_method=True):
"""
The general way of ending a payment.