Skip to content

Commit

Permalink
[FIX] l10n_br_nfe: apply context TZ to document_date
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoParadeda committed Oct 25, 2024
1 parent 22d3fa6 commit 6cf496f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion l10n_br_nfe/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 6cf496f

Please sign in to comment.