Commit Graph
28 Commits
Author SHA1 Message Date
Xavier Morel a671b744b8 [FIX] *: raw -> out of mail values 2021-04-29 05:34:20 +00:00
Xavier Morel c56e8c9f5a [FIX] digest: de-t-raw-ify
* fix generation of preferences markup so everything's properly
  safe (and flag as markup)
* tips should be the result of templates rendering and thus safe
* same for body
2021-04-29 05:34:20 +00:00
Noe Antoine da05b282d9 [IMP] hr_timesheet, website, digest : Add new digest tips
This commits adds a few digest tips concerning the website
customization and shortcuts in timesheet. It also changes
sequence of one.

Add css selectors to include button inside the digest tips,
matching existing style: no underline, white text on odoo
purple button.

PR #63784
Task-2341722

Related: odoo/enterprise#15478
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-02-01 16:51:27 +00:00
Francois (fge) 1738f9c8f7 [IMP] mass_mailing_sms: support KPIs emails for sms mailings
Currently KPIs reporting on mailings is supported only for mail mailings.
However we think it is interesting to have insights on SMS mailings as well
even if less KPIs are available. Indeed we currently do not support open
or reply KPIs.

This report will be sent by email 24 hours after the campaign sms are sent.
Modification are done of the digest_mail_layout to be able to use it to
generate the KPI report for Email or SMS mass mailing campaigns.

The goal is to have a single template that can be used for both SMS and email
mailings.

Some wording is also improved in various places of KPIs process.

Task ID-2274770
COM PR odoo/odoo#56887
UPG PR odoo/upgrade#1744
2020-12-03 12:46:51 +00:00
std-odoo 0a0b40c3c0 [FIX] digest: send the digest tips 2 hours after the database creation
PURPOSE

We want to send the digest tips 2 hours after the database creation.
It can not be done directly on the digest itself because its field
is a date and not a datetime.

So we change the "Next Run Date" of the digest to now, and we run
the digest CRON 2 hours after its creation.

LINKS

Task 2351561
Internal odoo/internal/pull/1051

closes odoo/odoo#59844

X-original-commit: d2e3c03f89c6c62dc06e05f5fe06104205245e20
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-13 11:01:36 +00:00
Thibault Delavallée 9afeb6094a [FIX] digest: fix layout issues
This commit fixes several issues

  * there are still some jinja references although the template is now done
    in QWeb;
  * put preferences content inside the same paragraph to avoid unnecessary
    blank spaces;
  * fix hardcoded company name (olé);

Followup of fd8709515c

Task ID-2338930

closes odoo/odoo#58577

X-original-commit: fd838a3d87f5bd326921dd15c2a41c3d1d3dd131
Related: odoo/enterprise#13591
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-09-28 10:12:23 +00:00
Anousone Phaysomphot fd8709515c [IMP] digest: improve digest layout and add new digest tips
PURPOSE

Review the tips and digest layout design to make sure they have a WOW effect
and increase trial conversion/retention.

SPECIFICATIONS: LAYOUT

Besides changing the tips, a cleaning of digest layout was performed. Emails
were reported to look not neat in Outlook and somewhat random in mail.com or
gmail.com.

Most recent HTML CSS cannot be used to make HTML emails because each email
provider renders emails its own way. This means a given email may renders
differently in gmail.com and outlook.

The layout of the email was composed of several levels of embedded tables
which means huge maintenance effort. So it was totally rewritten with divs
and CSS, but some properties are not taken into account.

A lot of page component improvements were done. It consisted in replacing most
of the style attribute in tags with CSS classes and ids. This step is
especially useful for tip formatting because before, if a style modification
was needed, it had to be performed on each tip individually.

SPECIFICATIONS: TIPS

“Speed up your workflow with shortcuts”
“Click on an avatar to chat with a user”
“A calculator in Odoo”
“How to ping users in internal notes?”
“Knowledge is power”

LINKS

Task ID-2274264
COM PR: odoo/odoo#53580
ENT PR: odoo/enterprise#1139

X-original-commit: 04aa36da30c107e482935b1673374c9302e4cf6a
2020-08-12 12:22:57 +00:00
std-odoo b16843230d [IMP] mass_mailing: send a statistics email to the mailing responsible
Purpose
=======
Provide a follow-up/overview of the Mailing 24 hours after its been sent.

Specifications
==============
Send an email to the responsible of the mailing 24 hours the last email
of the mass mailing.

During the link trackers creation, extract the button label if exists
(so we can display them in the statistics email).

Technical remarks
=================
The statistics email is sent to the responsible of each mailing in the
CRON of mass mailing.

Task-2227411

closes odoo/odoo#49836

Related: odoo/upgrade#1094
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-12 11:49:45 +00:00
Thibault DelavalléeandElisabeth Dickinson 2fa9805196 [IMP] digest: make tips bioutifoul, and add moar tips
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

Improve existing tips to be more inlined with new digest styling.

Add new tips, notably

  * Invite team members;
  * Learn about Odoo (eLearning platform);
  * allow push notifications;

LINKS

Task ID 2197417
PR odoo/odoo#51619

Co-Authored-By: Elisabeth Dickinson <edi@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-06-04 15:20:14 +00:00
Thibault Delavallée 99c2c2ee1e [REF] digest: move template to QWeb
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

Digest now use qweb views instead of a standard mail.template record for
rendering as

  * template is very custom;
  * probability of breaking it while edition the mail template is high;
    it is easier to maintain and extend in qweb;
  * only body was really used, other mail-related fields were not used;

We therefore remove the mail template data and the field used for it on
the digest model. Template is now forced to a Qweb view.

We can also remove the template_id field. Indeed we think that having
different templates for digests is a really advanced use case we do not
want to support.

Finally kpis and action computation is rewritten. It now returns an unique
structure containing all information in a more neutral way, holding values
for 3 columns. Purpose is to be less date-oriented in data construct and
allow people to use digest qweb template to display a 3-columns KPIs content
even if not related to yesterday / last 7 days / last 30 days.

LINKS

Task ID 2197417
Community PR odoo/odoo#51619
Upgrade PR odoo/upgrade#1256
2020-06-04 15:20:08 +00:00
Thibault Delavallée 14abd4fdf7 [IMP] digest: improve digest by adding daily sending and preferences
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

Add a daily digest option, allowing to send digests on a daily basis. It
will be the default settings to help users coming back to odoo.

Add a slowdown heuristics. If not any user targeted by a daily digest logs
himself within 3 days, digest is slowed down to a weekly setting to avoid
spam.

Add a preference section in template, to hold notably links to some
configuration steps sent mainly for admin / CEOs.

Improve access on models.

LINKS

Task ID 2197417
PR odoo/odoo#51619
2020-06-04 15:19:29 +00:00
Thibault DelavalléeandElisabeth Dickinson add1a04a94 [REF] digest: make digest template bioutifoul
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

Improve template according to FP specifications, aka
    Header
    Tip
    KPIs
    Preference text
    Want to customize?
    Mobile Tip
    Footer

LINKS

Task ID 2197417
PR odoo/odoo#51619
Upgrade PR odoo/upgrade#1256

Co-Authored-By: Elisabeth Dickinson <edi@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-06-04 15:19:29 +00:00
Thibault Delavallée b1037eb2d1 [IMP] digest, various: add name on tips to ease their understanding
PURPOSE

Ease edition of digest tips by adding a name.

SPECIFICATIONS

Add a name on digest tips. Even if technical and not send to customers it
allows to see them at a glance in list view without having to guess their
content.

LINKS

Task ID 2214325
Com PR odoo/odoo#47416

Related: odoo/upgrade#933
Related: odoo/enterprise#9167
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-11 16:24:32 +00:00
mcm-odooandThibault Delavallée de1743ab12 [REF] mail, various: remove user_signature field from mail.template
RATIONALE

Mail template model holds a field telling odoo mail engine to automatically
add the current user's signature to the body. Its use depends on the use
case

  * using the template in the composer on a single record: it is displayed
    in the rendered template in the composer, meaning people could change it.
    This behavior is interesting as it allows to see the email content;
  * using the template in the composer in mass mail mode: it is not displayed
    as only the raw jinja is displayed. It is therefore not obvious that it
    will be appended to the body of the mail. People could add it manually and
    have 2 signatures as a result;

A mechanism automatically adding a signature to sent emails when posting a
message is already implemented and is based on template existence. If a
template has been used when posting, no signature is added in sent emails.
Otherwise it is automatically added. This behavior should not change.

Behavior will therefore be

  * use a template -> specify signature usage in it manually through jinja;
  * do not use a template -> signature added in sent emails;

SPECIFICATIONS

Remove user_signature.

Update template body accordingly. In customer oriented templates that are using
it and do not already contain it, manually add a call to user.signature within
the jinja code. When set to False, just remove its declaration.

Quickly clean some signature integration.

LINKS

Task ID 2089252
Community PR odoo/odoo#39482
Enterprise PR odoo/enterprise#6459
Upgrade PR odoo/upgrate#761

Related: odoo/enterprise#6459
Related: odoo/upgrade#761
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2020-02-11 14:01:13 +00:00
Christophe Simonis ac4fc6e7c7 [MERGE] forward port branch saas-12.3 up to bd3e510edb
closes odoo/odoo#37314

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-24 09:44:56 +00:00
Christophe Simonis 5c89830885 [FIX] digest: do not reset config parameters on update
The `forcecreate=0` is required because the ICP will be deleted when set
to `False` (which is quite frequent for a boolean).

closes odoo/odoo#37103

X-original-commit: 255a12931d2a22dfadb1455a5dfc0a5e2f37b730
Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-18 18:41:01 +00:00
Parth Choksi 4c95cb7899 [FIX] digest: tips will be displayed properly
Currenly in the digest when you send the template, tips are not being seen.

The reason for this is, we are getting tips from the context but we dont have it in the context.
Instead, we are fetching the tips by calling the compute_tips method and assigning it to 'tips'.

Hence, this commit will remove the usage of context to get the tips as we are getting it
from the method and not from the context.

Task ID: #1918364

closes odoo/odoo#33186

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-06 12:41:47 +00:00
Parth Choksi 9e6cb6e62f [IMP] digest: active internal users in tip
One of the first tip is about using @ in chatter.
It should only take active internal users who already have logged in.
Currenly it takes all the users (eg: portal, inactive etc)

This commit will allow only internal users to be shown in the list.

Task-1918364
2019-05-07 07:04:34 +00:00
Parth Choksi 8776306e80 [FIX] digest: using greaterthan and lessthan builtins
Before this commit, when you send a digest template to the user,
the user would receive a blank mail(without any content).
And while rendering the template we were getting the following error:
jinja2.exceptions.TemplateSyntaxError: unexpected char '&' at 4039

This was due to the changes made in commit:
https://github.com/odoo/odoo/commit/a7ac71ed4404aa2630619c331d725f4f545626f8#diff-705145eec648d5ef61b7b4060ae96b9dR8
In this instead of using CDATA, there was a change of the field type to 'html' and thus there were issues of parsing for jinja.

Now after this commit, we will be using builtins of jinja:
 - 'greaterthan' instead of '>'
 - 'lessthan' instead of '<'

Task-1918364
2019-05-07 07:04:34 +00:00
Parth Choksi 52b4942525 [IMP] digest: improve the digest email layout
Purpose of the task is to improve the usability of digest email layout.

- Click on Connect button to connect to the database.
- Use same left padding in the header as in the section title.
- 2 decimal digits for monetary amounts, no space with currency symbol.
- Count real messages only, not notes or notifications.
- Add new tips for video tour.
- Moved recipients to a new tab.
- Changed email author to company's email.
- Some minor layout fixes.

Task-1918364
2019-05-07 07:04:34 +00:00
Parth Choksi a6ee929bb1 [FIX] digest: tips will be displayed properly
Currenly in the digest when you send the template, tips are not being seen.

The reason for this is, we are getting tips from the context but we dont have it in the context.
Instead, we are fetching the tips by calling the compute_tips method and assigning it to 'tips'.

Hence, this commit will remove the usage of context to get the tips as we are getting it
from the method and not from the context.

Task ID: #1918364
2019-05-07 06:54:29 +00:00
Thibault Delavallée a7ac71ed44 [FIX][IMP] various: perform small cleanup of mail templates
Notably
 * remove cdata and fix html code when necessary;
 * re-order fields declaration to have globally the same order in various
   template definition;
 * remove unnecessary reply-to, make user signature and auto delete fields
   explicit when necessary;
 * improve some name to ease template ordering and understanding in the
   template list view;

Related to task 1972615
Linked to PR #32872

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-23 14:26:50 +00:00
Thibault Delavallée 0b74c9ab6e [FIX][IMP] various: improve recipients computation in mail templates
Purpose: use more email_formatted when possible, clean and simplify
email_from, email_to and partner_to computation.

Next step is to try to extract some common patterns in tools or methods in
order to simplify template creation and customization.

Related to task 1972615
Linked to PR #32872
2019-04-23 14:26:50 +00:00
Julien (juc) Castiaux 6b7f1ef091 [FIX] digest: remove unnecessary context
The `company` context is explicitly set by `action_send` while the
template previewer doesn't set it. This inconsistency leads to
error when previewing the digest template.

opw-1939007

closes odoo/odoo#31195
2019-02-18 14:42:32 +00:00
Olivier Dony 8ee02ad136 [FIX] digest: correct a few typos 2018-11-16 16:35:22 +01:00
Xavier Morel c9e421a12d [FIX] *: move some data over from root to admin
* "alert" mail alias, could be useful for the admin to get these
* the weekly mail digest
* the getting started project (& its tasks)
2018-09-24 15:55:06 +02:00
Alexandre Kühn 6d53cd3201 [REF] mail,im_livechat,digest: rename 'chat_client_action' to 'Discuss'
Revision on https://github.com/odoo/odoo/commit/02ec09cb1c3e2d7bc7968f40c18f2208d7f3f498#diff-6d76770b1b7cf716d60a4d76a1555c1d

The commit above mostly renamed 'Client Action' to 'Discuss',
but there were some leftovers.
2018-08-17 16:28:39 +02:00
Mitali PatelandSiddharth Gajjar 2d1abe64e4 [ADD] digest: add new module to send recurrent digests by email
This commit adds a new digest module allowing to send recurrent digests by
email. Those contain a summary of the activity and display various KPIs
allowing to see the activity at a glance. It is also a great tool to improve
user engagement.

Digest module contain the core implementation of digests emails as well as
first basic KPIs. Future commits will gradually add KPIs in various main
addons.

Digests consist in email templates that have to call some methods on digest
module (compute_kpis, compute_tips, compute_kpis_actions) and render it
accordingly. A default digest is given in data allowing to tune it or to
duplicate and modify it.

Frequency is configurable on the digest; digests can be weekly, monthly or
send every 3 months. New employee users are added to the default widget.
KPIs are computed for each subscribed users so that results match its
groups and related access rights. Default digest therefore work for all users
as displayed results depend on their right without having to define separate
digests just for that purpose.

Implementation is done with Studio in mind. KPIs are computed fields on the
digest model. It means using Studio custom computed fields can be defined
to add customization to the digests, using fields named x_kpi_... .

Digests also holds tips to remind and warn users of features to activate
or configure like mailgateway.

KPIs can be linked to actions so that the section contain a link allowing
to directly jump on a given menu, allowing to directly link reporting
menus for example.

This commit is related Task ID 30655 and PR #18318.

Co-authored-by: Siddharth Gajjar <sga@odoo.com>
2018-07-19 11:26:45 +02:00