diff options
| author | Anjali <aaj@odoo.com> | 2020-12-02 07:06:35 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2021-01-05 09:54:25 +0000 |
| commit | b9743d3163a42f43490fea55aedf998c6d324ca3 (patch) | |
| tree | 23ad7595d2137874cfac857ee10ee329e8f25055 /addons/mass_mailing_sms | |
| parent | 91434c79dee96050a614642f494d7dae4d41703e (diff) | |
[FIX] mass_mailing{_sms}: fix various views for proper behavior
This commit fixes few views related to mass mailing for ensuring their
proper behavior. The changes are listed as below:
- in the mass mailing form view (view_mail_mass_mailing_form), made the
mailing_type field readonly if the mailing is not in draft state to
prevent switching the type once mailing is launched.
- in the mass mailing sms form view (mailing_mailing_view_form_sms), made the
'body_plaintext' field readonly if the mailing is in sent/done state to
prevent sms content modification after the sms are already sent
Task ID-2390284
COM PR odoo/odoo#62740
ENT PR odoo/enterprise#15098
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/mass_mailing_sms')
| -rw-r--r-- | addons/mass_mailing_sms/views/mailing_mailing_views.xml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/mass_mailing_sms/views/mailing_mailing_views.xml b/addons/mass_mailing_sms/views/mailing_mailing_views.xml index c919400d1db..b3b1643d5a5 100644 --- a/addons/mass_mailing_sms/views/mailing_mailing_views.xml +++ b/addons/mass_mailing_sms/views/mailing_mailing_views.xml @@ -110,7 +110,8 @@ </xpath> <xpath expr="//page[@name='mail_body']" position="after"> <page string="SMS Content" name="sms_body" attrs="{'invisible': [('mailing_type', '!=', 'sms')]}"> - <field name="body_plaintext" widget="sms_widget" attrs="{'required': [('mailing_type', '=', 'sms')]}" + <field name="body_plaintext" widget="sms_widget" + attrs="{'required': [('mailing_type', '=', 'sms')], 'readonly': [('state', 'in', ('sending', 'done'))]}" options='{"enable_emojis": True}'/> <group> <field name="sms_force_send" invisible="1"/> |
