python 2.7 - How to send automatically the same email to several users from code in Odoo8? -
i sending email in odoo 8 python code several users.
to using send_mail
method email.template
model, but, have pass 1 user id method, have loop send mail users:
for user in users: if user.partner_id , user.partner_id.email: mails_sent &= self.pool.get('email.template').send_mail( self.env.cr, 1, template.id, user.id, force_send=true, context=context)
my question is:
how can send 1 email users instead of 1 email each user?
you need see hr odoo 8
inherit class mail.thread
_inherit = ['mail.thread'] #..... #after can call id_msg = self.message_post( cr, uid, false, body=message, partner_ids=[id1,id2,id3], subtype='mail.mt_comment', context=context )
i hope :)
Comments
Post a Comment