diff options
| author | Jérémy Hennecart <jeh@odoo.com> | 2020-03-23 08:19:51 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-05-29 09:48:40 +0000 |
| commit | c15f9efed009dd2168fd8296ad573e70e4bbbe52 (patch) | |
| tree | e3216e1a52cb63888c0b1c1fc778f1473f33b1f1 /addons/mass_mailing/static/src | |
| parent | ad828f40424192337017a899566d71992381b574 (diff) | |
[IMP] mass_mailing: add email marketing tour
PURPOSE
Improve the Email Marketing tour and onboarding to create a "wow effect" when
users test the app.
SPECIFICATIONS
Create a tour for mass_mailing to let user visit Odoo Email Marketing through
a simple mailing creation flow.
This require the following functional changes
* by default, if user chooses to contact mailing lists and there is a single
mailing list available, add it as default value for chosen list;
* create a master mailing list data containing the admin user so that he can
easily follow the tour and test the mailing application;
LINKS
Task ID 2194876
Community PR odoo/odoo#48259
Upgrade PR odoo/upgrade#983
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/mass_mailing/static/src')
| -rw-r--r-- | addons/mass_mailing/static/src/js/tours/mass_mailing_tour.js | 87 | ||||
| -rw-r--r-- | addons/mass_mailing/static/src/xml/mass_mailing.xml | 2 |
2 files changed, 88 insertions, 1 deletions
diff --git a/addons/mass_mailing/static/src/js/tours/mass_mailing_tour.js b/addons/mass_mailing/static/src/js/tours/mass_mailing_tour.js new file mode 100644 index 00000000000..82d875e6839 --- /dev/null +++ b/addons/mass_mailing/static/src/js/tours/mass_mailing_tour.js @@ -0,0 +1,87 @@ +odoo.define('mass_mailing.mass_mailing_tour', function (require) { + "use strict"; + + var core = require('web.core'); + var _t = core._t; + var tour = require('web_tour.tour'); + var now = moment(); + + tour.register('mass_mailing_tour', { + url: '/web', + rainbowManMessage: _t('Congratulations, I love your first mailing. :)'), + }, [tour.stepUtils.showAppsMenuItem(), { + trigger: '.o_app[data-menu-xmlid="mass_mailing.mass_mailing_menu_root"]', + content: _t("Let's try the Email Marketing app."), + width: 210, + position: 'bottom', + edition: 'enterprise', + }, { + trigger: '.o_app[data-menu-xmlid="mass_mailing.mass_mailing_menu_root"]', + content: _t("Let's try the Email Marketing app."), + edition: 'community', + }, { + trigger: '.o-kanban-button-new', + content: _t("Start by creating your first <b>Mailing</b>."), + position: 'bottom', + }, { + trigger: 'input[name="subject"]', + content: _t('Pick the <b>email subject</b>.'), + position: 'right', + run: 'text ' + now.format("MMMM") + " Newsletter", + }, { + trigger: 'div[name="contact_list_ids"] > .o_input_dropdown > input[type="text"]', + run: 'click', + auto: true, + }, { + trigger: 'li.ui-menu-item', + run: 'click', + auto: true, + }, { + trigger: 'div[name="body_arch"] iframe #newsletter', + content: _t('Choose this <b>theme</b>.'), + position: 'left', + edition: 'enterprise', + run: 'click', + }, { + trigger: 'div[name="body_arch"] iframe #default', + content: _t('Choose this <b>theme</b>.'), + position: 'right', + edition: 'community', + run: 'click', + }, { + trigger: 'div[name="body_arch"] iframe div.o_mail_block_paragraph', + content: _t('Click on this paragraph to edit it.'), + position: 'top', + edition: 'enterprise', + run: 'click', + }, { + trigger: 'div[name="body_arch"] iframe div.o_mail_block_title_text', + content: _t('Click on this paragraph to edit it.'), + position: 'top', + edition: 'community', + run: 'click', + }, { + trigger: 'button[name="action_test"]', + content: _t("Test this mailing by sending a copy to yourself."), + position: 'bottom', + }, { + trigger: 'button[name="send_mail_test"]', + content: _t("Check the email address and click send."), + position: 'bottom', + }, { + trigger: 'button[name="action_put_in_queue"]', + content: _t("Ready for take-off!"), + position: 'bottom', + }, { + trigger: '.btn-primary:contains("Ok")', + content: _t("Don't worry, the mailing contact we created is an internal user."), + position: 'bottom', + run: "click", + }, { + trigger: '.o_back_button', + content: _t("By using the <b>Breadcrumb</b>, you can navigate back to the overview."), + position: 'bottom', + run: 'click', + }] + ); +}); diff --git a/addons/mass_mailing/static/src/xml/mass_mailing.xml b/addons/mass_mailing/static/src/xml/mass_mailing.xml index 266d7931ec5..b4a3bfce26b 100644 --- a/addons/mass_mailing/static/src/xml/mass_mailing.xml +++ b/addons/mass_mailing/static/src/xml/mass_mailing.xml @@ -6,7 +6,7 @@ </a> <div class="dropdown-menu" role="menu"> <t t-foreach="themes" t-as="theme"> - <a role="menuitem" href="#" class="dropdown-item"> + <a t-att-id="theme.name" role="menuitem" href="#" class="dropdown-item"> <div class="o_thumb small" t-attf-style="background-image: url(#{theme.img}_small.png)"/> <div class="o_thumb large" t-attf-style="background-image: url(#{theme.img}_large.png)"/> <div class="o_thumb logo" t-attf-style="background-image: url(#{theme.img}_logo.png)"/> |
