[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
This commit is contained in:
committed by
Thibault Delavallée
parent
114c2423b3
commit
1692d1ff3e
@@ -139,7 +139,7 @@
|
||||
attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/>
|
||||
<field name="subject" string="Subject" attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/>
|
||||
<label for="mailing_model_id" string="Recipients"/>
|
||||
<div>
|
||||
<div name="mailing_model_id_container">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-3" >
|
||||
<field name="mailing_model_id" widget="selection" required="True"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user