On the CRM module, the user can send an email to all the contacts associated to the leads matching some criteria by (1) displaying the list view, (2) applying a search filter, (3) clicking on the "EMAIL" button and (4) checking a checkbox on the mail composer to ask the server to use the active search. To do the same thing, the user can (1) display the list view, (2) apply a search filter, (3) select all the records and (3) click on the "EMAIL" button. To avoid redundancy and improve the usability of the composer, we will remove the search domain passing from the mail composer. Note that it will still be possible to pass a search domain programmatically. To improve the guidance of the mail composer, we will add helper messages, update the labels and move the options in a dedicated pane. The wording of the buttons will also be updated dynamically based on the selected options. Example: When the user enters something in the `mass_mailing_name` field to create a new mass mailing campaign from the new message, the label of the "Send" button will be set to "Send Mass Mailing" which gives more indication on what will happen when the user clicks on it. task-2523036 Part-of: odoo/odoo#71413
48 lines
2.4 KiB
XML
48 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<!-- Add mass mail campaign to the mail.compose.message form view -->
|
|
<record model="ir.ui.view" id="email_compose_form_mass_mailing">
|
|
<field name="name">mail.compose.message.form.mass_mailing</field>
|
|
<field name="model">mail.compose.message</field>
|
|
<field name="inherit_id" ref="mail.email_compose_message_wizard_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='notify']" position="after">
|
|
<field name="campaign_id" groups="mass_mailing.group_mass_mailing_campaign"
|
|
attrs="{'invisible': [('composition_mode', '!=', 'mass_mail')]}"/>
|
|
<field name="mass_mailing_name"
|
|
attrs="{'invisible': [('composition_mode', '!=', 'mass_mail')]}"/>
|
|
</xpath>
|
|
<xpath expr="//button[@name='action_send_mail'][not(hasclass('o_mail_send'))]" position="attributes">
|
|
<!-- 'Log' button -->
|
|
<attribute name="attrs">
|
|
{'invisible': [
|
|
'|',
|
|
('is_log', '=', False),
|
|
'&',
|
|
('mass_mailing_name', '!=', ''),
|
|
('mass_mailing_name', '!=', False)
|
|
]}
|
|
</attribute>
|
|
</xpath>
|
|
<xpath expr="//button[hasclass('o_mail_send')]" position="attributes">
|
|
<!-- 'Send' button -->
|
|
<attribute name="attrs">
|
|
{'invisible': [
|
|
'|',
|
|
('is_log', '=', True),
|
|
'&',
|
|
('mass_mailing_name', '!=', ''),
|
|
('mass_mailing_name', '!=', False)
|
|
]}
|
|
</attribute>
|
|
</xpath>
|
|
<xpath expr="//button[@name='action_send_mail']" position="after">
|
|
<button string="Send Mass Mailing" name="action_send_mail" type="object" class="btn-primary o_mail_send"
|
|
attrs="{'invisible': ['|', ('mass_mailing_name', '==', ''), ('mass_mailing_name', '==', False)]}" data-hotkey="q"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|