← Back to team overview

openerp-india team mailing list archive

[Bug 956898] Re: Server Action cannot send multiple E-mails

 

A similar problem is happening on 7.0 when a Sales Order is confirmed:

Traceback (most recent call last):
  File "/opt/openerp7/addons/mail/mail_mail.py", line 269, in send
    subtype_alternative = 'plain')
  File "/opt/openerp7/server/openerp/addons/base/ir/ir_mail_server.py", line 329, in build_email
    msg['To'] = encode_rfc2822_address_header(COMMASPACE.join(email_to))
TypeError: sequence item 0: expected string, bool found

Is this related or should I open a new bug?

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