如何在Odoo中查看来自营销活动的电子邮件地址?

时间:2015-09-24 10:11:57

标签: odoo odoo-8 openerp-8

我已经发送了一些来自营销的电子邮件营销活动,在“Mass Mailings”详情我有“电子邮件”按钮。当我点击它时,我有“邮件ID(技术)”,“邮件ID”,“已发送”等列。但我看不到我发送的电子邮件。

我怎么能看到这封电子邮件,我认为这是最重要的信息,因为我看不到哪个客户打开了电子邮件?

1 个答案:

答案 0 :(得分:5)

@Ek Kosmos,您需要添加一些代码才能这样做。请将以下代码应用于您的存储库。

addons / mass_mailing / models / mass_mailing_stats.py

https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=PLYQWoSxgWOXMjtLQJIikS56pu7eJusSKW&maxResults=25&pageToken=CB4QAA&key=AIzaSyDEm5wGLsWi2G3WG40re-DAJcWioQSpJ6o
同一文件中的

添加到columns = {}

 def _compute_recipient(self, cr, uid, ids, field_names, arg, context=None):
        res = dict.fromkeys(ids, '')
        for stat in self.browse(cr, uid, ids, context=context):
            if not self.pool.get(stat.model):
                continue
            target = self.pool[stat.model].browse(cr, uid, stat.res_id, context=context)
            email = ''
            for email_field in ('email', 'email_from'):
                if email_field in target and target[email_field]:
                    email = ' <%s>' % target[email_field]
                    break
            res[stat.id] = '%s%s' % (target.display_name, email)
        return res

然后加入视图

<强>附加元件/ mass_mailing /视图/ mass_mailing.xml

'recipient': fields.function(_compute_recipient, string='Recipient', type='char'),