diff options
| author | Olivier Dony <odo@openerp.com> | 2014-08-01 13:06:49 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2014-08-01 13:06:49 +0200 |
| commit | ee4df1e397a7f1ada09f53c3b72d9dddfa9b3e22 (patch) | |
| tree | 438b018b377a0c94be1d19e4c3928974b9d18f08 /addons/mass_mailing/controllers | |
| parent | 5ddc0305cd0bef77632ee50fb19ae7372ae5cb68 (diff) | |
| parent | 8b15482e0037b2484e993ffaf9e5691662c99e28 (diff) | |
[MERGE] Forward-port saas-4 up to 8b15482
Diffstat (limited to 'addons/mass_mailing/controllers')
| -rw-r--r-- | addons/mass_mailing/controllers/main.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/mass_mailing/controllers/main.py b/addons/mass_mailing/controllers/main.py index 5eed0e38615..bfe975059c5 100644 --- a/addons/mass_mailing/controllers/main.py +++ b/addons/mass_mailing/controllers/main.py @@ -67,8 +67,7 @@ class MassMailController(http.Controller): contact_ids = Contacts.search(cr, SUPERUSER_ID, [('list_id', '=', int(list_id)), ('email', '=', email)], context=context) if not contact_ids: - contact_ng = Contacts.name_create(cr, SUPERUSER_ID, email, context=context) - Contacts.write(cr, SUPERUSER_ID, [contact_ng[0]], {'list_id': int(list_id)}, context=context) + Contacts.add_to_list(cr, SUPERUSER_ID, email, int(list_id), context=context) # add email to session request.session['mass_mailing_email'] = email return True |
