Mailing : actions #42
@ -25,5 +25,17 @@ class GolemMember(models.Model):
|
||||
_inherit = 'golem.member'
|
||||
|
||||
@api.multi
|
||||
def getPartners(self):
|
||||
return self.mapped('partner_id').ids
|
||||
def get_mass_mailing_action(self):
|
||||
""" Call member mass mailing presend wizard """
|
||||
partners = self.mapped('partner_id').ids
|
||||
presend_wizard = self.env['golem.mail.presend.wizard'].create(
|
||||
{'partner_ids': [(6, 0, partners)]})
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': 'Member mass mailing',
|
||||
'res_model': 'golem.mail.presend.wizard',
|
||||
'res_id': presend_wizard.id,
|
||||
'view_mode': 'form',
|
||||
'view_type': 'form',
|
||||
'target': 'new'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user