Skip to content

Commit

Permalink
[FIX] l10n_br_nfe: ignore check key date if there is no doc date
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemotter committed Feb 5, 2025
1 parent ad48b00 commit e6f35f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion l10n_br_nfe/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ def _check_product_default_code(self):
@api.constrains("document_date", "document_key", "state_edoc")
def _check_document_date_key(self):
for rec in self:
if rec.document_key:
if rec.document_key and rec.document_date:
key_date_str = rec.document_key[2:6]
key_date = datetime.strptime(key_date_str, "%y%m")

Expand Down

0 comments on commit e6f35f0

Please sign in to comment.