summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2019-09-20 10:21:11 +0000
committerThibault Delavallée <tde@odoo.com>2019-09-20 13:44:09 +0000
commit61611c38e7e4c5bfc04d7fbc8491e80c941fe0e6 (patch)
treed15b616ba3c4904baf7a74155e1e78cc0eff0c56
parent5989322b8298671c2c43fe5b5c856f87111c0197 (diff)
[IMP] mass_mailing_sms: add a form view displaying mailing type choice
Currently in mass_mailing_sms form view of mailing is displaying differently depending on mailing_type field that is hidden. Purpose is to have a single form view while not allowing people to change the mailing type as they always come from a context where it is given (mass_mailing -> mail, mass mailing sms -> sms, same in marketing automation(_sms)). In this commit we create a new form view based on the existing one (inherit and primary) with the only change currently being the mailing_type being displayed. It will be used in some cases when we want people to contact in mass records without knowing if it will be mail or sms. For example on event, allowing to contact attendees and choose either mail or sms, avoiding to define two buttons and actions on event form view. Task ID 2074848 (sms on attendees) Task ID 2075183 (sms on speakers) PR #37185
-rw-r--r--addons/mass_mailing_sms/views/mailing_mailing_views.xml16
1 files changed, 16 insertions, 0 deletions
diff --git a/addons/mass_mailing_sms/views/mailing_mailing_views.xml b/addons/mass_mailing_sms/views/mailing_mailing_views.xml
index 0b8d47637f1..bbdee1ccbe5 100644
--- a/addons/mass_mailing_sms/views/mailing_mailing_views.xml
+++ b/addons/mass_mailing_sms/views/mailing_mailing_views.xml
@@ -130,6 +130,22 @@
</field>
</record>
+ <record id="mailing_mailing_view_form_mixed" model="ir.ui.view">
+ <!-- View allowign to display the mailing type and therefore choosing
+ the way of mailing: not prioritized one, used in some specific cases
+ like "contacting people" without predefining mail or sms -->
+ <field name="name">mailing.mailing.view.form.mixed</field>
+ <field name="model">mailing.mailing</field>
+ <field name="mode">primary</field>
+ <field name="priority">30</field>
+ <field name="inherit_id" ref="mass_mailing_sms.mailing_mailing_view_form_sms"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='mailing_type']" position="attributes">
+ <attribute name="invisible">0</attribute>
+ </xpath>
+ </field>
+ </record>
+
<record id="mailing_mailing_view_kanban_sms" model="ir.ui.view">
<field name="name">mailing.mailing.view.kanban.inherit.sms</field>
<field name="model">mailing.mailing</field>