openlabs / poweremail

Email module for OpenERP
23 stars 20 forks source link

Error on Send mail Wizard #30

Open eLBati opened 12 years ago

eLBati commented 12 years ago

Send mail Wizard raises the following exception because 'read' method returns a list

File "/home/elbati/workspace/openerp/6.1/server/openerp/addons/poweremail/send_wizard.py", line 187, in send_mail mailid = self.save_to_mailbox(cr, uid, ids, context) File "/home/elbati/workspace/openerp/6.1/server/openerp/addons/poweremail/send_wizard.py", line 233, in save_to_mailbox 'pem_from': tools.ustr(accounts.name) + "<" + tools.ustr(accounts.email_id) + ">", TypeError: list indices must be integers, not str

RuslansAlistek commented 11 years ago

Of course after this fix server has not throw this error, but this fix is not correctly, because screen_vals['from'] is of type 'unicode' and function read in result return record with empty field values (None).