From e66f1eb82e4fcc93e0e817c20065a21e3cb5d251 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Sun, 29 Oct 2017 18:48:30 +0100 Subject: [PATCH] Bug add cotis --- cotisations/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cotisations/models.py b/cotisations/models.py index 51a839e8..090636be 100644 --- a/cotisations/models.py +++ b/cotisations/models.py @@ -47,6 +47,7 @@ from __future__ import unicode_literals from dateutil.relativedelta import relativedelta from django.db import models +from django.db.models import Q from django.db.models.signals import post_save, post_delete from django.dispatch import receiver from django.forms import ValidationError @@ -170,7 +171,7 @@ class Vente(models.Model): cotisation = Cotisation(vente=self) cotisation.type_cotisation = self.type_cotisation if date_start: - end_adhesion = Cotisation.objects.filter( + end_cotisation = Cotisation.objects.filter( vente__in=Vente.objects.filter( facture__in=Facture.objects.filter( user=self.facture.user