summaryrefslogtreecommitdiff
path: root/addons/mass_mailing/controllers/main.py
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2017-09-13 15:18:12 +0200
committerYannick Tivisse <yti@odoo.com>2017-09-15 15:56:23 +0200
commit51b5ee7c3c1bbc08c5aa284300fd95f63cbf7ad1 (patch)
tree20e8d4393155038da314b6071ec04bb43af60b74 /addons/mass_mailing/controllers/main.py
parente9fca14452273be1807d3b47f6220f563c343481 (diff)
[IMP] mass_mailing: choose model among all chatter models
This commit removes the strange selection box based on a magic flag and some strange methods returning a string. Instead just allow to send mass mailing on all models inheriting from mail.thread using the is mail thread flag. Various addons are updated to remove the _mail_mass_mailing class attribute used to determine mass mailing capability. We consider people could send a mass mailing on every model inheriting from mail.thread. It makes no sense to limit it to a given set of addons.
Diffstat (limited to 'addons/mass_mailing/controllers/main.py')
-rw-r--r--addons/mass_mailing/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mass_mailing/controllers/main.py b/addons/mass_mailing/controllers/main.py
index b2e77c2875e..bcee631aad6 100644
--- a/addons/mass_mailing/controllers/main.py
+++ b/addons/mass_mailing/controllers/main.py
@@ -17,7 +17,7 @@ class MassMailController(http.Controller):
if mailing.exists():
res_id = res_id and int(res_id)
res_ids = []
- if mailing.mailing_model == 'mail.mass_mailing.contact':
+ if mailing.mailing_model_name == 'mail.mass_mailing.contact':
contacts = request.env['mail.mass_mailing.contact'].sudo().search([
('email', '=', email),
('list_id', 'in', [mailing_list.id for mailing_list in mailing.contact_list_ids])