forked from Yaltik/golem
Create golem_mail_recipient object
This commit is contained in:
parent
1840bdda7d
commit
2592404efd
@ -30,6 +30,9 @@ class GolemMember(models.Model):
|
|||||||
partners = self.mapped('partner_id').ids
|
partners = self.mapped('partner_id').ids
|
||||||
presend_wizard = self.env['golem.mail.presend.wizard'].create(
|
presend_wizard = self.env['golem.mail.presend.wizard'].create(
|
||||||
{'partner_ids': [(6, 0, partners)]})
|
{'partner_ids': [(6, 0, partners)]})
|
||||||
|
for partner in partners:
|
||||||
|
self.env['golem.mail.recipient'].create({'partner_id': partner,
|
||||||
|
'presend_wizard_id': presend_wizard.id})
|
||||||
return {
|
return {
|
||||||
'type': 'ir.actions.act_window',
|
'type': 'ir.actions.act_window',
|
||||||
'name': 'Member mass mailing',
|
'name': 'Member mass mailing',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user