openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #22738
[Bug 956898] Re: Server Action cannot send multiple E-mails
You are correct.
Adding an email address stops that error, but produces another error:
2013-01-31 23:25:54,888 15167 ERROR RC_LS_Dev openerp.addons.base.ir.ir_mail_server: Mail delivery failed via SMTP server 'localhost'.
error: 111
Connection refused
Traceback (most recent call last):
File "/opt/openerp7/server/openerp/addons/base/ir/ir_mail_server.py", line 459, in send_email
smtp = self.connect(smtp_server, smtp_port, smtp_user, smtp_password, smtp_encryption or False, smtp_debug)
File "/opt/openerp7/server/openerp/addons/base/ir/ir_mail_server.py", line 244, in connect
connection = smtplib.SMTP(host, port)
File "/usr/lib/python2.7/smtplib.py", line 249, in __init__
(code, msg) = self.connect(host, port)
File "/usr/lib/python2.7/smtplib.py", line 309, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/usr/lib/python2.7/smtplib.py", line 284, in _get_socket
return socket.create_connection((port, host), timeout)
File "/usr/lib/python2.7/socket.py", line 571, in create_connection
raise err
error: [Errno 111] Connection refused
2013-01-31 23:25:54,910 15167 ERROR RC_LS_Dev openerp.addons.mail.mail_mail: failed sending mail.mail 3
Traceback (most recent call last):
File "/opt/openerp7/addons/mail/mail_mail.py", line 271, in send
mail_server_id=mail.mail_server_id.id, context=context)
File "/opt/openerp7/server/openerp/addons/base/ir/ir_mail_server.py", line 473, in send_email
raise MailDeliveryException(_("Mail delivery failed"), msg)
MailDeliveryException: (u'Mail delivery failed', u"Mail delivery failed via SMTP server 'localhost'.\nerror: 111\nConnection refused")
So it moves on and tries to email the order, but can't because localhost
isn't a mail server.
Note that these errors for me are appearing in the log, not in the UI.
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/956898
Title:
Server Action cannot send multiple E-mails
Status in OpenERP Server:
Fix Released
Bug description:
Hello,
Here are the steps to reproduce this bug:
1 - Install hr_holidays module.
2 - Create new server action for 'hr.holidays' object and set action type email and set email address "object.employee_id.parent_id.user_id.user_email , object.employee_id.user_id.user_email".
3 - Assign this server action to 'confirm' workflow activity in hr.holidays workflow
4- Now create allocation request If I Press confirm button then generate following error.
Traceback (most recent call last):
File "/home/serpentcs/workspace/OpenERP/6.1/server/openerp/osv/osv.py", line 121, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/serpentcs/workspace/OpenERP/6.1/server/openerp/osv/osv.py", line 196, in exec_workflow
res = self.exec_workflow_cr(cr, uid, obj, method, *args)
File "/home/serpentcs/workspace/OpenERP/6.1/server/openerp/osv/osv.py", line 189, in exec_workflow_cr
return wf_service.trg_validate(uid, obj, args[0], method, cr)
File "/home/serpentcs/workspace/OpenERP/6.1/server/openerp/workflow/wkf_service.py", line 124, in trg_validate
res2 = instance.validate(cr, id, ident, signal)
File "/home/serpentcs/workspace/OpenERP/6.1/server/openerp/workflow/instance.py", line 48, in validate
workitem.process(cr, witem, ident, signal, force_running, stack=stack)
File "/home/serpentcs/workspace/OpenERP/6.1/server/openerp/workflow/workitem.py", line 61, in process
ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
File "/home/serpentcs/workspace/OpenERP/6.1/server/openerp/workflow/workitem.py", line 176, in _split_test
_join_test(cr, t[0], t[1], ident, stack)
File "/home/serpentcs/workspace/OpenERP/6.1/server/openerp/workflow/workitem.py", line 184, in _join_test
create(cr,[activity], inst_id, ident, stack)
File "/home/serpentcs/workspace/OpenERP/6.1/server/openerp/workflow/workitem.py", line 41, in create
process(cr, res, ident, stack=stack)
File "/home/serpentcs/workspace/OpenERP/6.1/server/openerp/workflow/workitem.py", line 53, in process
result = _execute(cr, workitem, activity, ident, stack)
File "/home/serpentcs/workspace/OpenERP/6.1/server/openerp/workflow/workitem.py", line 111, in _execute
res2 = wkf_expr.execute_action(cr, ident, workitem, activity)
File "/home/serpentcs/workspace/OpenERP/6.1/server/openerp/workflow/wkf_expr.py", line 64, in execute_action
result = obj.run(cr, ident[0], [activity['action_id']], ctx)
File "/home/serpentcs/workspace/OpenERP/6.1/server/openerp/addons/base/ir/ir_actions.py", line 687, in run
msg = ir_mail_server.build_email(email_from, [address], subject, body)
File "/home/serpentcs/workspace/OpenERP/6.1/server/openerp/addons/base/ir/ir_mail_server.py", line 307, in build_email
msg['To'] = encode_rfc2822_address_header(COMMASPACE.join(email_to))
TypeError: sequence item 0: expected string, tuple found
The attached merges for both 6.1 and trunk does the trick.
Thanks.
Serpent Consulting Services.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/956898/+subscriptions
References