Openerp send email to multiple recipients -


i using template send email. want send email multiple recipients, in field email_to accept object attributes:

<field name="email_to">${object.attribute}</field> 

i want send email using same template multiple recipients.

i using below code:

def action_send_email_to_attendees(self, cr, uid, ids, context=none):         '''         function opens window compose email         '''         assert len(ids) == 1, 'this option should used single id @ time.'         ir_model_data = self.pool.get('ir.model.data')         try:             template_id = ir_model_data.get_object_reference(cr, uid, 'mymodule', 'mymodule_invitation_email')[1]         except valueerror:             template_id = false         try:             compose_form_id = ir_model_data.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')[1]         except valueerror:             compose_form_id = false          ctx = dict(context)         ctx.update({             'default_model': 'mymodule.module',             'default_res_id': ids[0],             'default_use_template': bool(template_id),             'default_template_id': template_id,             'default_composition_mode': 'comment',             'mark_so_as_sent': true         })         return {             'type': 'ir.actions.act_window',             'view_type': 'form',             'view_mode': 'form',             'res_model': 'mail.compose.message',             'views': [(compose_form_id, 'form')],             'view_id': compose_form_id,             'target': 'new',             'context': ctx,         } 


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -