diff --git a/l10n_br_nfe/models/document.py b/l10n_br_nfe/models/document.py index dda45af340f6..2b1d68316190 100644 --- a/l10n_br_nfe/models/document.py +++ b/l10n_br_nfe/models/document.py @@ -853,7 +853,9 @@ def _check_document_date_key(self): key_date_str = rec.document_key[2:6] key_date = datetime.strptime(key_date_str, "%y%m") - document_date = fields.Datetime.from_string(rec.document_date) + document_date = fields.Datetime.context_timestamp( + rec, rec.document_date + ) if ( rec.document_type in ["55", "65"] and rec.state_edoc in ["a_enviar", "autorizada"]