summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrupal Oza <koz@odoo.com>2020-03-24 11:30:33 +0000
committerDharmraj Jhala <dja@odoo.com>2020-03-30 10:26:54 +0000
commit3287c28a0e48041d660e136e81933df24a773313 (patch)
tree6562f344e1a6202c2cd777d5877f41fbfcfcee68
parent5c97602c3f1b834828a32032b591d7a004512c44 (diff)
[IMP] mass_mailing{_sms}: allow switching mail server in sent mailing
Currently, users can't switch Outgoing Mail Server once the mailing has been sent. This might cause issue some situation. For example, the user has two Email Servers. He tries sending with the first server and something is wrong then emails couldn't be sent. So in this case user can not edit the mail server and instead has to create another mailing with second working server. This commit improves the behavior by removing the readonly attr on `Mail Server` field of mass mailing. Task-Id : 2223141 Closes : #48256 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
-rw-r--r--addons/mass_mailing/views/mailing_mailing_views.xml3
-rw-r--r--addons/mass_mailing_sms/views/mailing_mailing_views.xml5
2 files changed, 2 insertions, 6 deletions
diff --git a/addons/mass_mailing/views/mailing_mailing_views.xml b/addons/mass_mailing/views/mailing_mailing_views.xml
index a6b71889982..22c9c2ccbeb 100644
--- a/addons/mass_mailing/views/mailing_mailing_views.xml
+++ b/addons/mass_mailing/views/mailing_mailing_views.xml
@@ -218,8 +218,7 @@
<field name="attachment_ids" widget="many2many_binary" string="Attach a file" class="oe_inline"
attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/>
</div>
- <field name="mail_server_id" groups="base.group_no_one" options="{'no_create': True, 'no_open': True}"
- attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/>
+ <field name="mail_server_id" groups="base.group_no_one" options="{'no_create': True, 'no_open': True}"/>
<field name="keep_archives" groups="base.group_no_one" attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/>
</group>
<group string="Marketing" groups="base.group_no_one,mass_mailing.group_mass_mailing_campaign">
diff --git a/addons/mass_mailing_sms/views/mailing_mailing_views.xml b/addons/mass_mailing_sms/views/mailing_mailing_views.xml
index 9e1f48af3bc..989a4626440 100644
--- a/addons/mass_mailing_sms/views/mailing_mailing_views.xml
+++ b/addons/mass_mailing_sms/views/mailing_mailing_views.xml
@@ -138,10 +138,7 @@
<attribute name="attrs">{'invisible': [('mailing_type', '!=', 'mail')]}</attribute>
</xpath>
<xpath expr="//field[@name='mail_server_id']" position="attributes">
- <attribute name="attrs">{
- 'invisible': [('mailing_type', '!=', 'mail')],
- 'readonly': [('state', 'in', ('sending', 'done'))]}
- </attribute>
+ <attribute name="attrs">{'invisible': [('mailing_type', '!=', 'mail')]}</attribute>
</xpath>
</field>
</record>