Mailing : actions #42

Open
youssef wants to merge 33 commits from youssef/GOLEM:Mailing_actions into master
Showing only changes of commit 8c044023d8 - Show all commits

View File

@ -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'
}