Skip to content

Commit 8cf5ac7

Browse files
committed
[FIX] l10n_uy_ux: readded pre-checks on invoices confirmation
X-original-commit: 1c23023
1 parent 3a9e5d3 commit 8cf5ac7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

l10n_uy_ux/models/account_move.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ def _post(self, soft=True):
6666
return res
6767
msg = self.env._("Error al intentar validar el documento en DGI")
6868
for move in res.filtered(lambda m: m.l10n_uy_edi_is_needed):
69+
if pre_checks_errors := move._l10n_uy_edi_check_move():
70+
raise ValidationError(
71+
self.env._("Errors occurred while evaluating the document: \n") + "\n".join(pre_checks_errors)
72+
)
6973
move._l10n_uy_edi_send()
7074
if move.l10n_uy_edi_error:
7175
move.message_post(body=msg + " %s" % (move.l10n_uy_edi_error))

0 commit comments

Comments
 (0)