diff --git a/sbc_translation/models/translation_user.py b/sbc_translation/models/translation_user.py index abf716b11..d09b9539c 100644 --- a/sbc_translation/models/translation_user.py +++ b/sbc_translation/models/translation_user.py @@ -58,7 +58,8 @@ def _compute_nb_translated_letters_this_year(self): for translator in self: translator.nb_translated_letters_this_year = len( translator.translated_letter_ids.filtered( - lambda it: it.translate_date.year == fields.Datetime.now().year + lambda it: it.translate_date and + it.translate_date.year == fields.Datetime.now().year ) )