Commit Graph
553 Commits
Author SHA1 Message Date
Fabio Barbero 31e58ef720 [IMP] mass_mailing: allow responsible to turn off mailing reports
Purpose
=======
Allow users with enough access rights to disable next-day report on
mass mailing lists. The option has been added in the mass mailing
settings and is enabled by default. Mass mailing reports can also be
disabled with a "Turn off mailing reports" button in the report email
itself. Reports are enabled and disabled for all responsible.

Task-2692211

closes odoo/odoo#82430

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-10 08:46:31 +00:00
Antoine Guenet ccbcb4919e [FIX] mass_mailing: ensure media list items are full width
A horizontal padding was applied to each media list item, making it
impossible to make the media list items full width. Full width media
list items can always be reduced by adding padding in the editor, but
the converse is not true. For this reason, this commit applies
horizontal padding 0 to each media list item in the snippet template.

task-2716398

closes odoo/odoo#81637

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-12-20 13:38:59 +00:00
Antoine Guenet afa8233502 [FIX] mass_mailing: center image in cover snippet
When the cover snippet's image is in full width, we don't notice it's
not centered. But reduce its width and it appears at the left of its
container. There is no reasonable scenario in which this would be what
we expect so this commit centers that image by default.

task-2716399

Part-of: odoo/odoo#81637
2021-12-20 13:38:59 +00:00
Antoine Guenet f057befb82 [FIX] mass_mailing: use unicode copyright sign rather than font awesome
The footer templates were using a font awesome icon for the copyright
sign, while it has a unicode equivalent, which is easier to edit and
lighter.

task-2716401

Part-of: odoo/odoo#81637
2021-12-20 13:38:58 +00:00
Antoine Guenet 62dbff18ca [FIX] mass_mailing, website: prevent merge lines in s_numbers snippet
When double clicking a number in the numbers snippet, then typing a new
number, the number line would be merge with the text underneath. This
prevents that by adding a line break in between so they aren't
considered the same line by the editor (an inline with a block as
sibling is a tricky case for edition).

task-2711644

closes odoo/odoo#81551

X-original-commit: 886af1f328a9f1664b0d3e204bf984bfee28b215
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-12-16 16:44:56 +00:00
Antoine Guenet 9d1fabbda0 [FIX] mass_mailing: flag blockquote and highlight as inner snippets
The wrong classes were declared for the s_blockquote and
s_text_highlight snippets in the selector of so_content_addition. As a
result, these snippets could not be inserted inside other snippets.

task-2711645

closes odoo/odoo#81550

X-original-commit: 8d05470e51b9a48d73f8ffaba4789321523b3129
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-12-16 16:44:52 +00:00
Antoine Guenet 39f11615a9 [FIX] mass_mailing: allow changing color of columns
Prior to this commit, it was impossible to change the background color
of many columns (eg.: Big boxes). This was because the selector for the
option had likely not been adapted along with the snippet structure.

task-2711618

closes odoo/odoo#81538

X-original-commit: 9db006a6f2f5f1f8e6fd29ca0c0b5157988fb710
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-12-16 15:57:52 +00:00
Munaf Khan b296e076d4 [IMP] mass_mailing: enable audience segmentation
Right now, in our mass mailing, marketing users refine the audience they are
going to reach with our beautiful domain selector/editor. The problem here
is that the criteria that 'filters' audience can be very common and might be
used in many mailings.

Such filters have to be re-created manually each time they are needed unless
one duplicates a sent mailing. Another possible workaround is to access this
form view while in debug mode so that one can copy and paste those domain
expressions. Unfortunately, none of those solutions are either ideal or
convenient. Especially during the onboarding where new users are not very
familiar with those notions yet.

This commit allow users to save filters on the mass mailings. That way
favorite filters can be re-used on the next mailing. For that, we added
a new model 'mailing.filter'. We do not use existing 'ir.filter' model as
its usage is not completely the same and as we do not want to bloat view
filters with filters created on the fly in marketing application. This new
model contains the following fields:

 - name (given by user while saving the filter)
 - mailing_domain
 - mailing_model_id (m2o for the recipient model)
 - mailing_model_name (technical name of recipient model)

Users can create the filters by setting domain and then hitting hollow star
icon next to 'Filter' m2o and saving it with the name they want. Same way
to delete the saved filter, user simply have to click the filled star icon
when filter is already set. This is done through a new widget that adds its
own behavior on top of m2o widget.

The saved filters can be also managed with a new menu named 'Favorite Filters'
under 'Configuration' menu of Email marketing.

Task-2092853

closes odoo/odoo#70859

Related: odoo/enterprise#21049
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-29 19:01:43 +00:00
dht-odoo 2816537999 [FIX] mass_mailing: fix the tour bubble for mailing creation
We introduced a tour for email marketing (see commit[1]) which has one
important step, that asks user to create a new Mailing. However, the
selector for this step is generic, which makes the tour bubble appear
on every other installed app's kanban view create button.

Moreover, recently we've recently, for the mailing we've moved to
list view as landing view which previously used to be kanban view.

This commit fixes above issues by adding proper selectors for the
step (list view instead of kanban view) and by adding a new class
to mailing tree view named `o_mass_mailing_mailing_tree`. We provide
this class as extra_trigger for the tour step, so that it can target
the button specific for the tree view of the mailing.

commit[1] - c15f9ef

TaskID-2583760

closes odoo/odoo#80500

X-original-commit: c47bd34293aef5d3359911c3b6bf0da40288d6f5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-29 10:33:57 +00:00
Fabio Barbero 43fc87ecc4 [IMP] mass_mailing: improve mailing form view
Purpose
=======

Improve UI of mass_mailing module to give the user a clearer view of the
mailings they send, enabling A/B test by default since it is not invasive.

Specifications
==============

Remove border and padding around the chatter in mass mailing form view.
Add sum and average in mailing list view for KPIs
Change sort order from sent_date to calendar_date
Move user_id in form view
Set group_mass_mailing_campaign to True by default

Task-2679537

closes odoo/odoo#79213

Related: odoo/enterprise#22202
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-24 13:16:52 +00:00
Antoine Guenet 516a74a0c8 [REM] mass_mailing: remove unused snippets
Some snippets were removed in commit [1] but their now unused templates
were temporarily kept for migration purposes. This removes them.

[1] https://github.com/odoo/odoo/commit/6c63addd180e799eda99751768ccf20699136ca1

closes odoo/odoo#78358

Related: odoo/enterprise#21687
Related: odoo/upgrade#2923
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-16 10:02:18 +00:00
Mathieu Duckerts-Antoine 85b8a95116 [REF] *: clean some useless %% in xml files
The commit https://github.com/odoo/odoo/commit/1b40e9265f88f57aaaf311bb8fae3d1fd1966d7d
allows to get rid of most escapings %% in xmls but there were still occurences
of useless %% in some of them. We remove them.

closes odoo/odoo#78069

Related: odoo/enterprise#21553
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-11 12:34:47 +00:00
dht-odoo 10490139f1 [IMP] {mass_mailing}_sms: allow internal users to access UTM campaigns
Before this commit:
- UTM campaigns are accessible for all internal users, but with email
  marketing related modules installed, if user who does not have rights
  for email marketing tries to access the campaign, an AccessError is
  raised. It's because few fields related to email marketing are added
  in model `utm.campaign` which are accesible only to the marketing
  users.
- When the user is having `mass_mailing.group_mass_mailing_campaign`
  group enabled but no rights for email marketing, the root menu of
  for the 'Email Marketing' app is visible to that user, which is
  not correct.

With this commit:
- While adding marketing related fields to the campaign, we provide the
  group("mass_mailing.group_mass_mailing_user") at field level whenever
  neccessary so it doesn't raise AcessError. Also, we show those fields
  on the campaign views only when `mass_mailing.group_mass_mailing_campaign`
  group is enabled for the user. To do this, a compute field has been
  introduced to make sure that user has rights to access email marketing
  as well as the feature to manage mass mailing from campaigns is enabled.
  The reason behind introducing a new compute field is, at view level,
  it is not possible to check that user is having multiple groups.
- We've applied the group "mass_mailing.group_mass_mailing_user" on the
  root menu of Email Marketing app, so if the user has UI only group
  "mass_mailing.group_mass_mailing_campaign" and but no rights for
  email marketing, the root menu won't won't appear.

TaskID-2417993

closes odoo/odoo#74113

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-07 19:07:04 +00:00
fb20b16d48 [FIX] web_editor, *: review icon buttons sizing and paddings
*: mass_mailing, website, website_sale

Before this commit, it was impossible to add `fa-fw` directly on a
`we-button` as it would make the icon half invisible, since the whole
`we-button` would have the font-awesome `.fa-fw` css rule applied on it;
width: ~1.28em.

Then, one would need to insert a `<i/>` tag inside the `we-button` for
it to work.

This commit improves that behavior by handling automatically such cases,
and will preserve the purpose of the `fa-fw` class which is to have a
fixed width for those icons.

Note that the util class introduced in [1] (o_we_button_icon renamed
here in o_we_icon_button) is still useful to handle the case of svg
images, they are not allowed to shrink, the same way the fa buttons are.

[1]: https://github.com/odoo/odoo/commit/e4233643b93b521454cc146c6a2ae876781fb9ba

Related to task-2172311

closes odoo/odoo#77980

X-original-commit: e8ab9d76b802e80bb386812e4c8566825cbc2c92
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Younn Olivier <yol@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-10-07 13:09:26 +00:00
Antoine Guenet 47584e6716 [IMP] mass_mailing: show body_arch in readonly, body_html in a debug tab
The body of a mailing is saved in two fields: body_arch without
modifications, and body_html with conversion for email client
compatibility. Prior to this commit, we were showing body_html when
opening the form view of a saved mailing in readonly. This was pretty
strange and confusing as it's a sort of intermediary version that
doesn't mean much: an in-browser rendering of html that is compiled for
email clients.
With this commit, we change the view to always show body_arch instead.
A new tab is introduced in order to show body_html for debugging, which
is therefore only visible in debug mode.

Part-of: odoo/odoo#77724
2021-10-04 15:31:11 +00:00
Antoine Guenet 0249b0ce1a [REF] mass_mailing, website: rename conflictual snippet options classes
The css of some website snippets conflicted with their mass_mailing
equivalents. A quick, non-intrusive solution had been to contain that
css so it wouldn't conflict. This replaces that solution with the more
neighborly renaming of said snippets in mass_mailing. This way there is
no added awareness of mass_mailing within the code of website.

Part-of: odoo/odoo#77724
2021-10-04 15:31:11 +00:00
Antoine Guenet ff9a77c4be [FIX] mass_mailing, web(site,_editor): restore original website options
Commit [1] copied a lot of website snippet options into mass mailing.
Some were moved to web_editor and xpathed to be used in both without
duplicating code. Sadly that is not without side effects and it was
therefore decided to duplicate them instead so they can live separate
lives in the future.

[1] https://github.com/odoo/odoo/commit/4f7cd33d0fd69ee5984d0968233ffc73d7751030

Part-of: odoo/odoo#77724
2021-10-04 15:31:11 +00:00
Antoine Guenet a9d4603b37 [ADD] mass_mailing: temporarily restore removed templates
This commit is there to be reverted in master. It temporarily restores
templates previously removed so as not to break migrations.

- s_mail_block_banner
- s_mail_block_title_sub
- s_mail_block_paragraph
- s_mail_block_comparison_table
- s_mail_block_two_cols
- s_mail_block_three_cols
- s_mail_block_image_text
- s_mail_block_text_image
- s_mail_block_image
- s_mail_block_footer_separator
- s_mail_block_steps
- s_mail_block_discount2

task-2554899

X-original-commit: d49b1942d33a222ac9159e76f7931cb89a85016f
Part-of: odoo/odoo#77724
2021-10-04 15:31:10 +00:00
Elisabeth Dickinson de89159448 [FIX] mass_mailing: add styles to <head> for mail client compatibility
This adds a series of CSS styles to the `<head>` of mailings in order to
ensure better mail client compatibility.

task-2554899

X-original-commit: ace475defca0c143d707f7b53d9f19a9db6cfe3e
Part-of: odoo/odoo#77724
2021-10-04 15:31:09 +00:00
Elisabeth Dickinson d328063349 [ADD] mass_mailing: add an empty template to drop snippets into
This adds an empty template to `mass_mailing`, in which snippets can be
dropped, to start an HTML mailing from scratch.

task-2554899

X-original-commit: 7522272f42b38ef2f47e2432660bcf6a3030795c
Part-of: odoo/odoo#77724
2021-10-04 15:31:08 +00:00
Antoine Guenet d240d3a2ee [IMP] web_editor, mass_mailing: disable transparency in mass mailing
Transparency is not supported in several leading mail clients. This adds
the option to completely remove transparent colors from the palette, and
uses that option in `mass_mailing`.

task-2554899

X-original-commit: 4e2c859b6d4fb8d9c12e24d1c8ebc84aa0f3c72e
Part-of: odoo/odoo#77724
2021-10-04 15:31:08 +00:00
Antoine Guenet b3706f1afc [REM] mass_mailing: remove unnecessary table-related snippet
`mass_mailing_table_item` was charged with ensuring proper cloning and
removing of table elements precisely because `mass_mailing` relied so
heavily on them. Since it doesn't anymore, there is no need for that
option. This removes it.

task-2554899

X-original-commit: 386848568adb8e11f57e458cb7862cb3058b07c9
Part-of: odoo/odoo#77724
2021-10-04 15:31:07 +00:00
Antoine GuenetandElisabeth Dickinson d0c2d8e9a1 [ADD] mass_mailing, web[site|_editor]: website snippets to mass_mailing
The following snippets (and their relevant options) were added to
`mass_mailing`, mostly duplicated from the website builder:

- s_cover
- s_title
- s_text_block
- s_comparisons
- s_color_blocks_2
- s_three_columns
- s_image_text
- s_text_image
- s_picture
- s_features
- s_numbers
- s_masonry_block
- s_media_list
- s_showcase
- s_company_team
- s_call_to_action
- s_references
- s_product_list
- s_features_grid
- s_alert
- s_rating
- s_blockquote
- s_hr
- s_text_highlight
- s_coupon_code

The following snippets were removed to make way for the new:

- s_mail_block_banner
- s_mail_block_title_sub
- s_mail_block_paragraph
- s_mail_block_comparison_table
- s_mail_block_two_cols
- s_mail_block_three_cols
- s_mail_block_image_text
- s_mail_block_text_image
- s_mail_block_image
- s_mail_block_footer_separator
- s_mail_block_steps
- s_mail_block_discount2

The following standalone snippet options were added, mostly duplicated from the
website builder:

- Box
- layout_column
- SnippetMove
- snippet_options_text_align (via web_editor)
- snippet_options_width (via web_editor)
- snippet_options_block_align (via web_editor)
- BodyWidth (based on ContainerWidth but only for the mailing's body)
- minHeight
- so_snippet_addition
- so_content_addition
- sizing_x
- vAlignment

Styles and selectors were adapted to the specifics of `mass_mailing`.

task-2554899

X-original-commit: e5e1d4255ab416581b2ef7159c0c28540528771c
Part-of: odoo/odoo#77724
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
2021-10-04 15:31:07 +00:00
Antoine Guenet 5de7bdb924 [IMP] (website_)mass_mailing: convert tables to bootstrap grids
The new automatic conversion from Bootstrap grid to tables allows us to
convert `mass_mailing` templates from their old table structures to
Bootstrap grid (as the reverse conversion will now be applied on save).

General heuristic for the conversion of templates:

|      **Table**      |                **Bootstrap**               |
|:-------------------:|:------------------------------------------:|
|      `<table>`      |          `<div class="container">`         |
|      `<thead>`      |                 _(removed)_                |
|      `<tbody>`      |                 _(removed)_                |
|      `<tfoot>`      |                 _(removed)_                |
|        `<tr>`       |             `<div class="row">`            |
|        `<th>`       |       `<div class="col o_col_head">`       |
|        `<td>`       |             `<div class="col">`            |
| `<td width="_n_%">` | `<div class="col-_o_">` where o ~= 12n/100 |
|    `cellspacing`    | _(removed but always added back to table)_ |
|    `cellpadding`    | _(removed but always added back to table)_ |
|       `border`      | _(removed but always added back to table)_ |

Some styles had to be changed to account for the difference in the HTML.

task-2554899

X-original-commit: c26dac24c5fd15165935c770175c1b6f87aaad41
Part-of: odoo/odoo#77724
2021-10-04 15:31:06 +00:00
Anh Thao Pham (pta) f45a588438 [FIX] mass_mailing: fix assets call in layout
Some assets are missing from layout due to an incorrect namespace
since conversion to new assets system.

opw-2638542

closes odoo/odoo#76238

X-original-commit: b55cb521f9b0abc98877e9e57b81c2d6eb6ca35c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-09 12:05:05 +00:00
Jérémy Hennecart bc8f4373c3 [IMP] mass_mailing(_sms): a/b testing
Manage correctly a/b testing in mass_mailing.
We can now organize a mass_mailing campaign by testing
multiple mailings for the recipients targeted (subject,
templates, design, ...)

For this a new tab on the mailing record is added to better
promote the existence of the feature.

When an user has the group to manage mailing campaign, he can
access the tab A/B Test. This tab allows to enable A/B testing
for the mailing. If there is no campaign set for the mailing,
one is automatically created allowing the user to continue
smoothly.

Once A/B testing enable, the percentage of recipients use can be
set for each mailings. Also, the user can choose the deciding factor
that will set the final mailing as winner.
In a case, the user is not in manual mode, he can set the schedule datetime
for sending the final mailing.

task-2123242
COM PR: odoo/odoo#75622
ENT PR: odoo/enterprise#20454
UPG PR: odoo/upgrade#2781

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-07 18:08:03 +00:00
Mathieu Duckerts-Antoine 7545913020 [REF] *: graph archs cleaning
We clean various graph archs taking into consideration that:
 - the default type of a graph is "bar".
 - a bar chart is by default stacked.
 - the field attributes type="row" and type="col" does not make sense for
   a graph view (since its implementation was separated from the pivot
   implementation a long time ago))
 - the boolean attributes should now take 1 or 0 as value (but the other
   values are accepted for retrocompatibility).

Part-of: odoo/odoo#76065
2021-09-07 15:50:14 +00:00
d1e227b07b [IMP] web,*: new PivotView component
Part-of: odoo/odoo#73311
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2021-09-07 10:04:38 +00:00
Noe Antoine e1747acc48 [IMP] mass_mailing[_sms]: use simplified form for mailing list quick creation
BEFORE THIS COMMIT

When creating a mailing.mailing from "Create a mailing", the form can contain
a mailing.list field. This is a m2m and one can create and edit lists from
there. However, when using create and edit, the default creation form contained
a few smart buttons that can make the user exit the view. This does not have
much sense for a mailing list being created, and we want the user to stay in
the mailing.mailing being created.

AFTER THIS COMMIT

The view mailing_list_view_form_simplified is used when using create and edit
from there instead of default form one. It does not include any misleading stat
buttons anymore.

The footer including discard and close buttons is removed and is added to a new
primary inheriting view mailing_list_view_form_simplified_footer, used instead
of the previous one in the mailing.list creation form in kanban view, keeping
the previous behaviour and clarifying structure.

Since the field is a many2many in this case, we want the user to be able to save
and create / save and new / discard. This was not the case before, removing the
footer will result in using the default one for m2m. That way, all these actions
will be available as well and work as expected.

--- Links ---
Task-Id - 2605436
COM PR - odoo/odoo#74772

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-20 13:58:48 +00:00
dht-odoo 37d94d3f98 [IMP] mass_mailing(_sms), link_tracker: improve action helper messages
This commit improves action helper message and sample data for
different menus of link tracker for better onboarding.

Menus (link tracker)

1) Mediums(action -> utm_medium_action)
2) Source(action -> utm_source_action)

Menus (mass mailing)

1) Mailings(action -> mailing_mailing_action_mail)
2) Mailing Lists(action -> action_view_mass_mailing_lists)
3) Campaign Tags(action -> action_view_utm_tag)
4) Blacklisted Email Addresses(action -> mail_blacklist_action)

Menus (mass mailing sms)

1) SMS Marketing(action -> mailing_mailing_action_sms)
2) Mailing Lists(action -> mailing_list_action_sms)
3) Mailing List Contacts(action -> mailing_contact_action_sms)
4) SMS Marketing Analysis(action -> mailing_trace_report_action_sms)
5) Blacklisted Phone Numbers(action -> phone_blacklist_action)

Menu name changed for following menu.

1)Contacts Lists to Mailing Lists
2)Contacts to Mailing List Contacts

Task-2584073
PR odoo/odoo#74082
2021-08-20 13:11:03 +00:00
Thibault Delavallée ad2fe60525 [IMP] mass_mailing: improve trace views in mailing context
PURPOSE

Improve user experience by correctly contextualizing trace display when coming
from a mailing.

SPECIFICATIONS

Display relevant fields, hide other one (sms number when coming from a mail
mailing, email when coming from an sms marketing). Set some technical fields
as optional (message ID, status update). Use badge for status. Allow to open
recipient document directly from list view.

Improve wording (mail -> email). Reorder form view to try to have less noise
by hiding void fields and replacing the status bar (not clickable and any not
a business flow) by a classic field.

LINKS

Task ID-2377974
Community PR odoo/odoo#61467
Enterprise PR odoo/enterprise#14633
2021-08-18 13:38:17 +00:00
Thibault Delavallée bbf4783ac6 [REF] mass_mailing: improve traces state management
PURPOSE

Improve modeling and performances of mass mailing by manually updating trace
status instead of using complex computed fields and lessening fields usage.

Remove some fields and keep only relevant metrics to simplify and clean trace
model.

SPECIFICATIONS

In this commit we clean the way trace state is managed. Currently it is a
computed field based on several datetime fields. However this generates a
lot of noise in the table as well as unnecessary computation

  * there are several columns (one for each state) storing datetime at
    which status was reached. Generally only 2 or 3 contain relevant
    information;
  * state could be set in code directly to avoid a computed field based on
    many triggers;
  * recomputing it each time a date changes is not necessarily necessary;
  * state value can always be updated manually as this is main done through
    some automated server update (mailgateway, link clicks, ...);

As trace states and its triggers should not be updated manually it is better
to synchronize it in code flow. When there is an exception or update done
through sending or gateway status is updated as well accordingly. Various
datetime fields are also updated at the same time. In order to align with
notification model mail and sms trace status are updated to a classic field.
Only last status update is now kept as there is no need to store the entire
history of status change.

We keep only a datetime for relevant metrics: open, reply and click. Other
datetime bring no real value. Knowing when a trace was in error or bounced
is not necessary. Indeed exception generally indicates a server issue (at
sending), cancel indicates a data issue (at sending) and bounce depends on
customer email server.

Status update is removed as using write_date is sufficient. Once created
traces are updated only when an external event occurs (opened, replied, ...).
It allows to simplify trace model.

We also rename ignored field into canceled to match naming use through mail
and sms.

QUERY COUNTERS

This change has some positive update on query counters when sending mailings
as traces have less unnecessary status update compared to priori this change.

LINKS

Task ID-2377974
Community PR odoo/odoo#61467
Enterprise PR odoo/enterprise#14633
Upgrade PR odoo/upgrade#1907
2021-08-18 13:38:08 +00:00
Julien Banken e605faa59c [FIX] mass_mailing: fix the issue with the action helper overflow.
In the 'mass_mailing' module, the action helper has an absolute position
and will be placed relatively to the top left corner of the form sheet
With this configuration, the element can sometimes be placed off the
notebook page. It can occur when the list of recipients placed above the
notebook page contains a lot of elements.

To fix the issue, we will wrap the content of the notebook page in a
`div` having the `position-relative` class. The content helper will then
be placed relatively to that element which prevents the overflow.

task-2614456

closes odoo/odoo#75149

X-original-commit: 5d34828f5e25bb7c28c226c4226c1062138721c7
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-16 12:05:57 +00:00
std-odoo 5c44c5438d [IMP] mass_mailing: improve the default mail FROM used for mailing
Purpose
=======
Now that we try to not spoof the FROM SMTP headers, we want to improve
the default mail FROM used in mailing. By default, it's the email of
the current user, but if no mail server is configured for it, we will
use the notification email instead and encapsulate the email of the
user in it.

e.g.:
    Original: "Admin" < admin@odoo.com >
    Final: "Admin (admin@odoo.com)" < notifications@odoo.com >

Show a warning message if the configured mail server can not be used
for the email from.

Task-2367946
odoo/odoo#61853
odoo/upgrade#1903
2021-08-13 12:27:09 +00:00
Julien Banken 1ecca57619 [IMP] mass_mailing: improve the mailing list contacts form view
This commit improves the form view of 'Mailing List Contacts'. It will:
- Add a color picker on the tag ('tag_ids').
- Make the bouncing counter ('message_bounce') unmodifiable.
- Make the creation date ('create_date') and the bouncing counter
  ('message_bounce') invisible when the user creates a new record.

task-2611112

closes odoo/odoo#74440

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-13 09:31:02 +00:00
Antoine Guenet 66b757b5ed [IMP] mass_mailing: restyle the mass mailing form view to full width
Currently, editing a mail feels a little claustrophobic because of the
boxes within boxes within boxes design. This commit removes the chatter
and the sheet from the form view so the mail editor can take up more
horizontal space. The chatter is then moved into one of the notebook's
tabs.

Task-2545445

closes #71511
2021-08-12 10:19:12 +00:00
Kevin Baptiste 86aa7b78aa [IMP] *: introduce data-hotkey on form and modal views
Define `data-hotkey` on most used action buttons.

For the modals, the following keys are dedicated for "special"
actions:
 - Alt+G: add
 - Alt+V: save
 - Alt+Z: cancel

closes odoo/odoo#73275

Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-15 08:39:49 +00:00
Xavier Morel 27b02d2ec9 [FIX] web, *: de-t-raw kanban views
Add HTML fields support to kanban view (currently bespoke but maybe it
should be done via `format`), and remove t-raw for HTML fields there.

Also just strip some t-raws which were completely unnecessary to start with
2021-07-20 05:40:55 +00:00
Julien Banken ceb78ebf14 [IMP] mass_mailing: cosmetic changes on the tree view of the mass mailing model
PURPOSE

This commit aims to apply some cosmetic changes on the mass mailing
tree view to improve its usability.

SPECS

- New precedence order for the mass mailing views: With the kanban view,
mailings tend to pile up. When there are a lot of mailings, it can become
tricky to find a specific mailing given that the names of the mailing are
often generic and redondant (e.g. "Don't Miss Out", "Special Offer", ...)
For this reason, we will encourage people to use the list view by giving
the list view a higher precedence over the kanban view.
- Add progress bars for the delivered rate and the open rate (in the tree view).
- New column order for the tree view.
- Remove the unused and invisible field 'mailing_type' from the tree view.
- Set the fields 'mailing_model_id' and 'campaign_id' as optional.
- Minor decorator update.

LINKS

Task id: 2588188

closes odoo/odoo#73276

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-16 07:44:11 +00:00
Fabien Pinckaers a65f6a5872 [IMP] various: clean most urls to odoo's website
Pages changed on odoo.com so let's update links.

closes odoo/odoo#72707

Related: odoo/enterprise#19239
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-24 15:14:29 +00:00
Munaf Khan 20955462f0 [IMP] various: beautify list-views using decoration
Currently, to identify records based on state, in most of the list views we
use 'badge' widget on 'state' fields which can be decorated as needed.

However, for the list views, best approach would be to also add list
decoration along with 'badge' widget so that the whole line is colored
and it's easy for user to 'scan' the information

This commit improves the behavior adding decorations to several list-views.
To check the list of changes, kindly see the task specification

Apart from that, this commit also improves label of the module state from
'Not Installed' to 'Uninstalled'.

TaskID-2527119

closes odoo/odoo#71367

Related: odoo/enterprise#18587
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-03 09:24:13 +00:00
Antoine Guenet af546b7b35 [FIX] mass_mailing: properly background-color .o_mail_snippet_general
The "o_mail_snippet_general" class implies a background color but when
coloring the snippet that color was applied to its parent. This ensures
that the color is applied to .o_mail_snippet_general instead.

closes odoo/odoo#71500

Related: odoo/enterprise#18619
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-06-01 10:07:03 +00:00
Antoine Guenet ce938b45a0 [FIX] mass_mailing: properly set new background colors in columns
Colorpicker snippets target <td> elements while these sometimes contain
a <div> which is background-colored in css. In consequence, when using
the colorpicker to change the background color of the snippet, the
colored <div> came in front of the element of which we tried to change
the color. This ensures the snippets target the <div> instead when the
<td> itself is marked as non-colorable via the "o_mail_no_colorpicker"
class, as this is then in fact the element we want to color.
Enterprise themes need to be adapted to this new behavior.
2021-06-01 10:07:03 +00:00
nounoubensebia 171eea3fae [IMP] mass_mailing[_sms], tools: make mass mailing form focus on body
Make the email body take the entire space to avoid having some wasted space,
this will also make the user have more focus when designing an email.

Revamp the settings notebook page in order to give more clarity to the user,
and move some fields from the main form have been moved to this section to
have more space in the bottom for the email body.

In the mailing form, when the mailing is sent or is being sent, set fields
which are no longer useful for the user to change to readonly mode.

Add a wizard that enables the user to schedule a mailing, the schedule field is
still kept in the form for the user to be able to change the date when the
mailing is in the queue (if they want to send it sooner).

Display an action helper-style content when the email is empty, because,
currently, the user is left with a big white screen when the email has no
content which is not desirable.

Update the html_empty function to take into account style attributes to better
match the editor's void content.

Hide A/B testing fields from SMS mailing form view as these are not supported
for SMS marketing.

Task-2469409

closes odoo/odoo#68882

Ent-pr: https://github.com/odoo/odoo/pull/68882
Related: odoo/enterprise#18391
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-20 09:40:40 +00:00
yograj tandel e893651cec [IMP] *: remove widget='selection' from many2one fields
Currently, across Odoo, there are around 40+ many2one fields defined with a
'selection' widget. Since the many2one widget has options to limit record
creation and opening, there is no reason to define a many2one field with a
selection widget. The selection widget does not allow for searching, and is
limited to 100 records.

PURPOSE
to update the definition of any many2one on which we applied a 'selection'
 widget, and instead use the standard many2one widget with disabled
opening/creation instead.

after this commit,
for each many2one field defined with widget="selection",  widget="selection" is
replaced with options="{'no_open': True, 'no_create': True}"

Task : 2476488

closes odoo/odoo#68387

Related: odoo/enterprise#17316
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-05-20 11:01:28 +00:00
Antoine Guenet e8a6fd31d5 [FIX] mass_mailing: keep the cursor in the promo code when emptying it
When selecting the contents of a promo code then typing a letter, that
letter was inserted before the promo code instead of in it. It was also
impossible to get back inside the promo code after that.

Given the nature of that snippet it seems reasonable to make the promo
code itself unremovable. This way we can benefit from the editor's
ability to keep the cursor in an empty unremovable inline.

Note: This fix requires a change in the editor:
https://github.com/odoo-dev/odoo-editor/commit/1c98f141458de297a4b819f3fb21f532986e9872.
Do not merge without it.

closes odoo/odoo#70930

X-original-commit: ffe0277613f73e046c4e343cfb0197c937063717
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-05-18 08:07:17 +00:00
dht-odoo 12469ef4d3 [IMP] various: improve the sequence of menu items
- Currently all menus are out of order in app switcher.
- For example, Sales app is 16 menu away from Accounting,
  Social Marketing app is 25 menu away from Email Marketing, etc.
  So, all menus should be reordered.

- This commit will reorder the menus of the app switcher in order to reduce
  the distance between correlated applications,
  and bring the most common apps upward.
- And in this commit we have left gap of 5 subsequent sequence for further new menus.

PR: #69984
TASK ID: 2513082

Related: odoo/enterprise#17989
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-07 05:54:18 +00:00
Xavier Morel a671b744b8 [FIX] *: raw -> out of mail values 2021-04-29 05:34:20 +00:00
Xavier Morel 996cb85c27 [FIX] *: mass replace known t-raws by t-out
* QWeb bodies should be markup-safe so `0` should always be
  markup-safe.
* `head` is qweb-rendered so the same.
* The `json` pseudo-module in qweb templates is `json.scriptsafe`,
  which should be markup-safe.
2021-04-29 05:34:20 +00:00
Thibault Delavallée c8aabac87d [IMP] mass mailing: update reply_to_mode keys
Propagate reply_to radio keys (update and new) to mass mailing in order to have
a coherent naming (was thread and email). This naming is also coherent with
gateway naming (message_update and message_new).

LINKS

Task ID-2117639
COM PR odoo/odoo#40931
ENT PR odoo/enterprise#17941
UPG PR odoo/upgrade#2419
2021-04-26 14:18:33 +00:00