summaryrefslogtreecommitdiff
path: root/addons/mass_mailing_sms
diff options
context:
space:
mode:
authorDebauche Stéphane <std@odoo.com>2019-09-18 09:14:36 +0000
committerThibault Delavallée <tde@odoo.com>2019-09-20 14:05:41 +0000
commit1692d1ff3ea561c70bcd992e71913ba018f149f4 (patch)
tree67c7278a8c13363716ccfaf5d12e4a39fcd57df2 /addons/mass_mailing_sms
parent114c2423b307226e799c7a44483297e9446408ce (diff)
[FIX] mass_mailing: ease marketing automation inheritance
Purpose of this commit is to add an anchor in mass mailing view in order to ease some marketing automation fixes. Also reset the sms composer context when sending sms from an sms mailing as it may create some issues when sending manually an sms from a marketing activity (see enteprise). Indeed wrong participant is chosen. Task ID 2073158 (marketing automation fixes) PR #37185 PR odoo/enterprise#5693
Diffstat (limited to 'addons/mass_mailing_sms')
-rw-r--r--addons/mass_mailing_sms/models/mailing_mailing.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mass_mailing_sms/models/mailing_mailing.py b/addons/mass_mailing_sms/models/mailing_mailing.py
index 88de914331a..49d7b6a0a3c 100644
--- a/addons/mass_mailing_sms/models/mailing_mailing.py
+++ b/addons/mass_mailing_sms/models/mailing_mailing.py
@@ -19,7 +19,7 @@ class Mailing(models.Model):
sms_template_id = fields.Many2one('sms.template', string='SMS Template', ondelete='set null')
sms_has_insufficient_credit = fields.Boolean(
'Insufficient IAP credits', compute='_compute_sms_has_insufficient_credit',
- help='UX Field to propose to buy IAP credits')
+ help='UX Field to propose to buy IAP credits')
# opt_out_link
sms_allow_unsubscribe = fields.Boolean('Include opt-out link', default=True)
@@ -182,7 +182,7 @@ class Mailing(models.Model):
if not res_ids:
raise UserError(_('There is no recipients selected.'))
- composer = self.env['sms.composer'].create(mailing._send_sms_get_composer_values(res_ids))
+ composer = self.env['sms.composer'].with_context(active_id=False).create(mailing._send_sms_get_composer_values(res_ids))
# extra_context = self._get_mass_mailing_context()
# auto-commit except in testing mode