[FIX] account_edi: prevent typeerror when object is None

If applied, this commit will solve the  'NoneType' object is not iterable when
in _get_mail_attachment_from_doc function returns None.

Steps to reproduce the issue:
- Install Accounting and l10n_in_edi.
- Go to accounting -> Configuration -> Journals -> Customer Invoices
  -> Advanced Settings -> Enable Electronic invoicing
- Switch company to IN Company
- Go to Account -> New invoice -> Add required fields -> Confirm -> Send & Print

sentry-4215675843

closes odoo/odoo#124346

X-original-commit: 84bcdcf6042a7d938803c95a6e0fe06f6e22aef9
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
Renilkumar Kajavadra
2023-06-12 22:39:38 +02:00
parent 604a47ead8
commit 2b110f7fde
@@ -15,6 +15,7 @@ class AccountMoveSend(models.Model):
'mimetype': attachment_sudo.mimetype,
'placeholder': False,
}]
return []
def _get_default_mail_attachments_data(self, mail_template, move):
""" Returns all the placeholder data and mail template data