Débug calcule total par moi qui se basé sur la date de création et non dtDate
This commit is contained in:
@@ -49,9 +49,9 @@ class Collabs_hour(models.Model):
|
||||
@admin.display( description='Total du mois')
|
||||
def get_total_hour_by_user(self):
|
||||
#objs = Collabs_hour.objects.filter(user_id=self.user_id,dtCreated__year=self.dtCreated.year, dtCreated__month=self.dtCreated.month)
|
||||
objs = Collabs_hour.objects.filter(user_id=self.user_id, dtCreated__year=self.dtCreated.year , dtCreated__month=self.dtCreated.month)
|
||||
print(f"user {self.user} dtCreated__year {self.dtCreated.year} dtCreated__month {self.dtCreated.month}")
|
||||
print( Collabs_hour.objects.all())
|
||||
objs = Collabs_hour.objects.filter(user_id=self.user_id, dtDate__year=self.dtDate.year , dtDate__month=self.dtDate.month)
|
||||
print(f"user {self.user} dtCreated__year {self.dtDate.year} dtCreated__month {self.dtDate.month}")
|
||||
#print( Collabs_hour.objects.all())
|
||||
|
||||
total = 0.0
|
||||
|
||||
|
Reference in New Issue
Block a user