summaryrefslogtreecommitdiff
path: root/addons/mass_mailing/views
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-09-13 18:07:59 +0200
committerChristophe Simonis <chs@odoo.com>2019-09-13 18:07:59 +0200
commit6c948c36bbf72dd896e0bff03aa7fbddadcbb0cd (patch)
treef8620905c011735d8a3c340c46d1417a54a75972 /addons/mass_mailing/views
parent48503fcf08eac6fed12e080d4f501f9bbc8d257d (diff)
parent197474e5b9ad43ab2d587a98136a1a809ce9a2e7 (diff)
[MERGE] forward port branch saas-12.5 up to 197474e5b9a
Diffstat (limited to 'addons/mass_mailing/views')
-rw-r--r--addons/mass_mailing/views/assets.xml4
-rw-r--r--addons/mass_mailing/views/link_tracker_views.xml8
-rw-r--r--addons/mass_mailing/views/mailing_contact_views.xml4
-rw-r--r--addons/mass_mailing/views/mailing_mailing_views.xml205
-rw-r--r--addons/mass_mailing/views/snippets_themes.xml15
-rw-r--r--addons/mass_mailing/views/utm_campaign_views.xml10
6 files changed, 141 insertions, 105 deletions
diff --git a/addons/mass_mailing/views/assets.xml b/addons/mass_mailing/views/assets.xml
index d2645ef6c14..6143a5bd602 100644
--- a/addons/mass_mailing/views/assets.xml
+++ b/addons/mass_mailing/views/assets.xml
@@ -24,9 +24,7 @@
</template>
<template id="assets_mail_themes_edition"> <!-- maybe to remove and convert into a field dumy with attr invisible if the template is not selected -->
- <t t-call="web._assets_helpers">
- <link rel="stylesheet" type="text/scss" href="/web_editor/static/src/scss/wysiwyg_variables.scss"/>
- </t>
+ <t t-call="web._assets_helpers"/>
<link rel="stylesheet" type="text/scss" href="/mass_mailing/static/src/scss/mass_mailing.ui.scss"/>
<link rel="stylesheet" type="text/scss" href="/web/static/src/scss/webclient.scss"/>
</template>
diff --git a/addons/mass_mailing/views/link_tracker_views.xml b/addons/mass_mailing/views/link_tracker_views.xml
index 295afdcdd31..7381518f3fb 100644
--- a/addons/mass_mailing/views/link_tracker_views.xml
+++ b/addons/mass_mailing/views/link_tracker_views.xml
@@ -34,7 +34,9 @@
<field name="view_id" ref="link_tracker.link_tracker_view_tree"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
- Create a new link tracker
+ Create a link tracker
+ </p><p>
+ Trackers are used to collect count stat about click on links and generate short URLs.
</p>
</field>
<field name="context">{'search_default_mass_mailing_id': active_id}</field>
@@ -47,7 +49,9 @@
<field name="view_id" ref="link_tracker.link_tracker_view_tree"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
- Create a new link tracker
+ Create a link tracker
+ </p><p>
+ Trackers are used to collect count stat about click on links and generate short URLs.
</p>
</field>
<field name="context">{'id="link_tracker_action_mass_mailing"': active_id}</field>
diff --git a/addons/mass_mailing/views/mailing_contact_views.xml b/addons/mass_mailing/views/mailing_contact_views.xml
index 002ba900e7b..76642b2c196 100644
--- a/addons/mass_mailing/views/mailing_contact_views.xml
+++ b/addons/mass_mailing/views/mailing_contact_views.xml
@@ -223,9 +223,9 @@
<field name="context">{'search_default_filter_not_email_bl': 1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
- Create a contact in your address book
+ Create a mailing contact
</p><p>
- Odoo helps you to easily track all activities related to a customer.
+ Mailing contacts allow you to separate your marketing audience from your business contact directory.
</p>
</field>
</record>
diff --git a/addons/mass_mailing/views/mailing_mailing_views.xml b/addons/mass_mailing/views/mailing_mailing_views.xml
index d6672f4bab2..56b2542a751 100644
--- a/addons/mass_mailing/views/mailing_mailing_views.xml
+++ b/addons/mass_mailing/views/mailing_mailing_views.xml
@@ -8,7 +8,6 @@
<search string="Mailings">
<field name="name" string="Mailing" filter_domain="['|', ('name', 'ilike', self), ('subject', 'ilike', self)]"/>
<field name="campaign_id" string="Campaign"/>
- <field name="mailing_type" invisible="1"/>
<filter string="My Mailings" name="assigned_to_me"
domain="[('user_id', '=', uid)]"
help="Mailings that are assigned to me"/>
@@ -48,7 +47,7 @@
<field name="arch" type="xml">
<form string="Mailing">
<header style="min-height:31px;">
- <button name="action_put_in_queue" type="object" attrs="{'invisible': [('state', 'in', ('in_queue', 'done'))]}" class="oe_highlight" string="Send Now"
+ <button name="action_put_in_queue" type="object" attrs="{'invisible': [('state', 'in', ('in_queue', 'done'))]}" class="oe_highlight" string="Send"
confirm="This will send the email to all recipients. Do you still want to proceed ?"/>
<button name="action_schedule" type="object" attrs="{'invisible': [('state', 'in', ('in_queue', 'done'))]}" class="btn-secondary" string="Schedule"/>
<button name="action_test" type="object" class="btn-secondary" string="Test"/>
@@ -58,46 +57,40 @@
<field name="state" readonly="1" widget="statusbar"/>
</header>
<div class="alert alert-info text-center" attrs="{'invisible': [('ignored', '=', 0)]}" role="alert">
- <p>
- <button class="btn-link"
- name="action_view_traces_ignored"
- type="object">
- <strong>
- <field name="ignored" class="oe_inline mr-2"/>
- <span name="ignored_text">emails have been ignored and will not be sent.</span>
- </strong>
- </button>
- </p>
+ <button class="btn-link py-0"
+ name="action_view_traces_ignored"
+ type="object">
+ <strong>
+ <field name="ignored" class="oe_inline mr-2"/>
+ <span name="ignored_text">emails have been ignored and will not be sent.</span>
+ </strong>
+ </button>
</div>
<div class="alert alert-info text-center" attrs="{'invisible': [('scheduled', '=', 0)]}" role="alert">
- <p>
- <button class="btn-link"
- name="action_view_traces_scheduled"
- type="object">
- <strong>
- <field name="scheduled" class="oe_inline mr-2"/>
- <span name="scheduled_text">emails are in queue and will be sent soon.</span>
- </strong>
- </button>
- </p>
+ <button class="btn-link py-0"
+ name="action_view_traces_scheduled"
+ type="object">
+ <strong>
+ <field name="scheduled" class="oe_inline mr-2"/>
+ <span name="scheduled_text">emails are in queue and will be sent soon.</span>
+ </strong>
+ </button>
</div>
<div class="alert alert-info text-center" attrs="{'invisible': ['|', ('state', '!=', 'done'), ('failed', '=', 0)]}" role="alert">
- <p>
- <button class="btn-link"
- name="action_view_traces_failed"
- type="object">
- <strong>
- <field name="failed" class="oe_inline mr-2"/>
- <span name="failed_text">emails could not be sent.</span>
- </strong>
- </button>
- </p>
+ <button class="btn-link py-0"
+ name="action_view_traces_failed"
+ type="object">
+ <strong>
+ <field name="failed" class="oe_inline mr-2"/>
+ <span name="failed_text">emails could not be sent.</span>
+ </strong>
+ </button>
</div>
<div class="alert alert-info text-center" attrs="{'invisible': [('state', '!=', 'in_queue')]}" role="alert">
- <p><strong>
- This mailing is scheduled for
+ <strong>
+ <span name="next_departure_text">This mailing is scheduled for</span>
<field name="next_departure" class="oe_inline"/>.
- </strong></p>
+ </strong>
</div>
<sheet>
<div class="oe_button_box" name="button_box">
@@ -141,81 +134,115 @@
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<group>
<field name="active" invisible="1"/>
- <field name="name" required="1" string="Mailing Name"/>
- <field name="mailing_type" widget="radio" options="{'horizontal': true}" invisible="1"/>
- <field name="subject" string="Subject"/>
+ <field name="name" required="1" string="Name"/>
+ <field name="mailing_type" widget="radio" options="{'horizontal': true}" invisible="1"
+ 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>
- <field name="mailing_model_id" widget="selection" required="1"/>
+ <div class="row">
+ <div class="col-xs-12 col-md-3" >
+ <field name="mailing_model_id" widget="selection"
+ attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/>
+ </div>
+ <div attrs="{'invisible': [('mailing_model_name', '!=', 'mailing.list')]}" class="col-xs-12 col-md-9 pt-1">
+ <label for="contact_list_ids" string="Select mailing lists:" class="oe_edit_only"/>
+ <field name="contact_list_ids" widget="many2many_tags"
+ placeholder="Select mailing lists..." class="oe_inline"
+ attrs="{
+ 'required':[('mailing_model_name','=','mailing.list')],
+ 'readonly': [('state', 'in', ('sending', 'done'))]
+ }"/>
+ </div>
+ </div>
+
<field name="mailing_model_name" invisible="1"/>
<field name="mailing_model_real" invisible="1"/>
- <field name="mailing_domain" widget="domain"
- attrs="{'invisible': [('mailing_model_name', '=', 'mailing.list')]}"
- options="{'model': 'mailing_model_real'}">
+ <field name="mailing_domain" widget="domain" options="{'model': 'mailing_model_real'}"
+ attrs="{
+ 'invisible': [('mailing_model_name', '=', 'mailing.list')],
+ 'readonly': [('state', 'in', ('sending', 'done'))]
+ }">
</field>
- <div attrs="{'invisible': [('mailing_model_name', '!=', 'mailing.list')]}">
- <label for="contact_list_ids" string="Select mailing lists:" class="oe_edit_only"/>
- <field name="contact_list_ids" widget="many2many_tags"
- placeholder="Select mailing lists..." class="oe_inline"/>
- </div>
</div>
</group>
<notebook>
<page string="Mail Body" name="mail_body">
- <field name="body_html" class="oe_read_only" widget="html" options="{
- 'cssReadonly': 'mass_mailing.iframe_css_assets_readonly',
- }"/>
- <field name="body_arch" class="o_mail_body oe_edit_only" widget="mass_mailing_html" options="{
- 'snippets': 'mass_mailing.email_designer_snippets',
- 'cssEdit': 'mass_mailing.iframe_css_assets_edit',
- 'inline-field': 'body_html'
- }"/>
+ <div attrs="{'invisible': [('state', 'in', ('sending', 'done'))]}">
+ <field name="body_html" class="oe_read_only" widget="html"
+ options="{'cssReadonly': 'mass_mailing.iframe_css_assets_readonly'}"/>
+ <field name="body_arch" class="o_mail_body oe_edit_only" widget="mass_mailing_html"
+ options="{
+ 'snippets': 'mass_mailing.email_designer_snippets',
+ 'cssEdit': 'mass_mailing.iframe_css_assets_edit',
+ 'inline-field': 'body_html'
+ }"/>
+ </div>
+ <div attrs="{'invisible': [('state', 'not in', ('sending', 'done'))]}">
+ <field name="body_html" attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/>
+ </div>
</page>
- <page string="Options">
+ <page string="Settings">
<group>
- <group string="Mailing">
+ <group>
<field name="user_id"/>
- <field name="unique_ab_testing" groups="base.group_no_one"/>
- <field name="email_from"/>
+ <field name="unique_ab_testing" groups="base.group_no_one" attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/>
+ <field name="email_from" attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/>
<label for="reply_to"/>
<div name="reply_to_details">
<field name="reply_to_mode" widget="radio"
- attrs="{'invisible': [('mailing_model_name', 'in', ['mailing.contact', 'res.partner', 'mailing.list'])]}"/>
+ attrs="{
+ 'invisible': [('mailing_model_name', 'in', ['mailing.contact', 'res.partner', 'mailing.list'])],
+ 'readonly': [('state', 'in', ('sending', 'done'))]
+ }"/>
<field name="reply_to"
- attrs="{'required': [('reply_to_mode', '=', 'email')], 'invisible': [('reply_to_mode', '=', 'thread')]}"/>
+ attrs="{
+ 'required': [('reply_to_mode', '=', 'email')],
+ 'invisible': [('reply_to_mode', '=', 'thread')],
+ 'readonly': [('state', 'in', ('sending', 'done'))]
+ }"/>
</div>
<label for="attachment_ids"/>
<div name="attachment_ids_details">
- <field name="attachment_ids" widget="many2many_binary" string="Attach a file" class="oe_inline"/>
+ <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}"/>
- <field name="schedule_date" groups='base.group_no_one'/>
- <field name="keep_archives" groups="base.group_no_one"/>
- <field name="create_date" readonly="1" attrs="{'invisible': [('create_date', '=', False)]}"/>
- <field name="sent_date" readonly="1" attrs="{'invisible': [('sent_date', '=', False)]}"/>
+ <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="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">
<field name="campaign_id"
string="Mailing Campaign"
- groups="mass_mailing.group_mass_mailing_campaign"/>
+ groups="mass_mailing.group_mass_mailing_campaign"
+ attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/>
<field name="source_id"
string="Source"
readonly="1"
required="False"
- groups="base.group_no_one"/>
+ groups="base.group_no_one"
+ attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/>
<field name="medium_id"
string="Medium"
required="True"
- groups="base.group_no_one"/>
+ groups="base.group_no_one"
+ attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/>
<label for="contact_ab_pc" groups="mass_mailing.group_mass_mailing_campaign"/>
<div groups="mass_mailing.group_mass_mailing_campaign">
- <field name="contact_ab_pc" class="oe_inline"/> %
+ <field name="contact_ab_pc"
+ class="oe_inline"
+ attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/> %
</div>
</group>
</group>
</page>
</notebook>
</sheet>
+ <div class="oe_chatter">
+ <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
+ <field name="message_ids" widget="mail_thread"/>
+ <field name="activity_ids" widget="mail_activity"/>
+ </div>
</form>
</field>
</record>
@@ -224,12 +251,15 @@
<field name="name">mailing.mailing.kanban</field>
<field name="model">mailing.mailing</field>
<field name="arch" type="xml">
- <kanban default_group_by="state">
+ <kanban default_group_by="state" quick_create="false">
<field name='state' readonly="1"/>
<field name='email_from' readonly="1"/>
<field name='color'/>
+ <field name='user_id'/>
<field name='expected'/>
<field name='failed'/>
+ <field name='total'/>
+ <field name='mailing_model_id'/>
<field name='sent_date'/>
<field name='active'/>
<templates>
@@ -253,11 +283,14 @@
<div class="oe_kanban_content">
<div class="o_kanban_record_top">
<div class="o_kanban_record_headings">
- <h3 class="mt4 mb4"><field name="name"/></h3>
+ <h3 class="mt4 mb4">
+ <field name="name"/>
+ </h3>
<field name="mailing_type" invisible="1"/>
<div class="o_kanban_record_subtitle" attrs="{'invisible': [('sent_date', '=', False)]}">
- <h5 style="display: inline;"><field name="campaign_id" groups="mass_mailing.group_mass_mailing_campaign"/></h5>
- <t t-if="record.campaign_id.raw_value" groups="mass_mailing.group_mass_mailing_campaign"> - </t><field name="sent_date"/>
+ <h5 style="display: inline;">
+ <field name="campaign_id" groups="mass_mailing.group_mass_mailing_campaign"/>
+ </h5>
</div>
</div>
</div>
@@ -265,9 +298,7 @@
<t t-if="record.sent_date">
<div class="row" name="stat_opened">
<div class="col-8">
- <a name="%(action_view_mail_mail_statistics_mailing)d"
- context="{'search_default_filter_opened': True}"
- type="action">Opened</a>
+ Opened
</div>
<div class="col-4 text-right">
<field name="opened_ratio"/> %
@@ -275,9 +306,7 @@
</div>
<div class="row" name="stat_replied">
<div class="col-8">
- <a name="%(action_view_mail_mail_statistics_mailing)d"
- context="{'search_default_filter_replied': True}"
- type="action">Replied</a>
+ Replied
</div>
<div class="col-4 text-right">
<field name="replied_ratio"/> %
@@ -285,20 +314,26 @@
</div>
<div class="row" name="stat_clicks">
<div class="col-8">
- <a name="%(link_tracker_action_mass_mailing)d"
- type="action">Clicks</a>
+ Clicks
</div>
<div class="col-4 text-right">
<field name="clicks_ratio"/> %
</div>
</div>
- <div class='o_kanban_primary_bottom' name="stat_delivered">
+ <div class='mt-1' name="stat_delivered">
<field name="delivered" widget="progressbar" title="Delivered" options="{'current_value': 'delivered', 'max_value': 'expected', 'editable': false}"/>
</div>
</t>
</div>
</div>
- <div class="oe_clear"></div>
+ <div>
+ <span class="fa fa-clock-o text-muted mr-2" attrs="{'invisible': [('sent_date', '=', False)]}"/><field name="sent_date"/>
+ <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" class="oe_kanban_avatar float-right"/>
+ </div>
+ <div name="div_total_model" class="oe_clear text-muted" style="display: inline;">
+ <field name='total'/>
+ <field name='mailing_model_id'/>
+ </div>
</div>
</t>
</templates>
diff --git a/addons/mass_mailing/views/snippets_themes.xml b/addons/mass_mailing/views/snippets_themes.xml
index ac6c75ba128..b268850e6f7 100644
--- a/addons/mass_mailing/views/snippets_themes.xml
+++ b/addons/mass_mailing/views/snippets_themes.xml
@@ -2,11 +2,11 @@
<odoo>
<!-- Snippets & Themes Menu -->
<template id="email_designer_snippets" inherit_id="web_editor.snippets" primary="True">
- <xpath expr="//h2[@id='snippets_menu']" position="replace">
- <t t-set="company_id" t-value="res_company"/>
- <h2 id="snippets_menu">Select a template</h2>
+ <xpath expr="//div[@id='snippets_menu']" position="inside">
+ <button type="button" disabled="disabled">Select a template</button>
</xpath>
<xpath expr="//div[@id='o_scroll']" position="replace">
+ <t t-set="company_id" t-value="res_company"/>
<div id="o_scroll">
<div id="email_designer_themes">
<div data-name="basic"
@@ -72,7 +72,6 @@
</div>
</div>
</xpath>
-
<xpath expr="//div[@id='snippet_options']" position="inside">
<t t-call="mass_mailing.snippet_options"/>
</xpath>
@@ -811,10 +810,10 @@
<div data-js="colorpicker"
data-selector=".note-editable > div:not(.o_layout), .note-editable .oe_structure > div, td, th"
data-exclude=".o_mail_no_colorpicker, .o_mail_no_options">
- <div class="dropdown-submenu">
- <a tabindex="-1" href="#" class="dropdown-item"><i class="fa fa-eyedropper"/>Background Color</a>
- <div class="dropdown-menu" role="menu"/>
- </div>
+ <we-collapse-area>
+ <we-toggler><i class="fa fa-eyedropper"/> Background Color</we-toggler>
+ <we-collapse/>
+ </we-collapse-area>
</div>
</template>
</odoo>
diff --git a/addons/mass_mailing/views/utm_campaign_views.xml b/addons/mass_mailing/views/utm_campaign_views.xml
index 81559afa633..82f08f4ec4b 100644
--- a/addons/mass_mailing/views/utm_campaign_views.xml
+++ b/addons/mass_mailing/views/utm_campaign_views.xml
@@ -7,8 +7,8 @@
<field name="arch" type="xml">
<xpath expr="//sheet" position="before">
<header style="min-height:31px;">
- <button name="%(action_create_mass_mailings_from_campaign)d" type="action" class="oe_highlight" string="Send new Mailing"/>
- <button name="%(action_create_ab_mass_mailings_from_campaign)d" type="action" class="oe_highlight" string="Send new A/B Testing Mailing"/>
+ <button name="%(action_create_mass_mailings_from_campaign)d" type="action" class="oe_highlight" string="Create a mailing"/>
+ <button name="%(action_create_ab_mass_mailings_from_campaign)d" type="action" class="btn-secondary" string="Create an A/B Testing Mailing"/>
<span><field name="stage_id" widget="statusbar" options="{'clickable': '1'}"/></span>
</header>
</xpath>
@@ -100,9 +100,9 @@
<field name="view_mode">kanban,tree,form</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
- Create a new UTM campaign
+ Create a mailing campaign
</p><p>
- Create a campaign to structure mailing and get analysis from email status.
+ Campaigns are the perfect tool to track results across multiple mailings.
</p>
</field>
<field name="domain">[('is_website', '=', False)]</field>
@@ -123,4 +123,4 @@
action="utm.action_view_utm_tag"
sequence="2"
groups="mass_mailing.group_mass_mailing_campaign"/>
-</odoo> \ No newline at end of file
+</odoo>