fixed a bug that raised an error when sending email-attachments from type model 'account.invoice'