Skip to content

Commit

Permalink
Merge PR #3182 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by rvalyi
  • Loading branch information
OCA-git-bot committed Aug 23, 2024
2 parents 7f80f22 + b322417 commit bd9b40c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions l10n_br_nfe/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,13 @@ def import_binding_nfe(self, binding, edoc_type="out"):
return document

def _document_cancel(self, justificative):
if self.document_type_id.code in [MODELO_FISCAL_NFE]:
if not justificative or len(justificative) < 15:
raise ValidationError(
_(
"Please enter a justification that is at least 15 characters long."
)
)
result = super()._document_cancel(justificative)
online_event = self.filtered(filter_processador_edoc_nfe)
if online_event:
Expand Down

0 comments on commit bd9b40c

Please sign in to comment.