[FIX] l10n_eg_edi_eta: avoid infinite loop by setting the blocking level to error
If you have only blocking level warning/info and the batch is bigger than 25, then it will generate an infinite loop. In order to avoid that, when an invoice is still to be signed we put it in error, also because a manual intervention of the user is required anyways. closes odoo/odoo#98322 X-original-commit: a707934ac0494b707975b96c18fddfd7b5ef8b9f Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
@@ -348,7 +348,7 @@ class AccountEdiFormat(models.Model):
|
||||
return {
|
||||
invoice: {
|
||||
'error': _("An error occured in created the ETA invoice, please retry signing"),
|
||||
'blocking_level': 'info'
|
||||
'blocking_level': 'error'
|
||||
}
|
||||
}
|
||||
invoice_json = json.loads(invoice.l10n_eg_eta_json_doc_id.raw)['request']
|
||||
@@ -356,7 +356,7 @@ class AccountEdiFormat(models.Model):
|
||||
return {
|
||||
invoice: {
|
||||
'error': _("Please make sure the invoice is signed"),
|
||||
'blocking_level': 'info'
|
||||
'blocking_level': 'error'
|
||||
}
|
||||
}
|
||||
return {invoice: self._l10n_eg_edi_post_invoice_web_service(invoice)}
|
||||
|
||||
Reference in New Issue
Block a user