fixed a bug that raised an error when sending email-attachments from typ...

...e model 'account.invoice'