Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on Send mail Wizard #30

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Error on Send mail Wizard #30

wants to merge 1 commit into from

Conversation

eLBati
Copy link
Contributor

@eLBati eLBati commented Oct 16, 2012

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

Traceback (most recent call last):
  File "/home/elbati/workspace/openerp/6.1/server/openerp/osv/osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/elbati/workspace/openerp/6.1/server/openerp/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/elbati/workspace/openerp/6.1/addons/audittrail/audittrail.py", line 495, in execute_cr
    return fct_src(cr, uid, model, method, *args)
  File "/home/elbati/workspace/openerp/6.1/server/openerp/osv/osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  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
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants