[IMP] account: EDI decoder should post in the chatter on error
Added a small message in the chatter on an invoice when the invoice fails import. Silencing errors on a blank invoice doesn't help us fix issues and doesn't solve the import problem. Part-of: odoo/odoo#153556
This commit is contained in:
@@ -3170,11 +3170,9 @@ class AccountMove(models.Model):
|
||||
except RedirectWarning:
|
||||
raise
|
||||
except Exception:
|
||||
_logger.exception(
|
||||
"Error importing attachment '%s' as invoice (decoder=%s)",
|
||||
file_data['filename'],
|
||||
decoder.__name__
|
||||
)
|
||||
message = _("Error importing attachment '%s' as invoice (decoder=%s)", file_data['filename'], decoder.__name__)
|
||||
invoice.sudo().message_post(body=message)
|
||||
_logger.exception(message)
|
||||
|
||||
passed_file_data_list.append(file_data)
|
||||
close_file(file_data)
|
||||
|
||||
Reference in New Issue
Block a user