From ceb78ebf145c8e32b2f8169fb7784d28c7fe8e1b Mon Sep 17 00:00:00 2001 From: Julien Banken Date: Fri, 16 Jul 2021 07:35:31 +0000 Subject: [PATCH] [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) --- addons/mass_mailing/models/mailing.py | 2 +- .../views/mailing_mailing_views.xml | 17 +++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/addons/mass_mailing/models/mailing.py b/addons/mass_mailing/models/mailing.py index fe0415601c0..73ac0a0f9fb 100644 --- a/addons/mass_mailing/models/mailing.py +++ b/addons/mass_mailing/models/mailing.py @@ -82,7 +82,7 @@ class MassMailing(models.Model): states={'draft': [('readonly', False)], 'in_queue': [('readonly', False)]}, compute='_compute_schedule_date', store=True, copy=True) calendar_date = fields.Datetime('Calendar Date', compute='_compute_calendar_date', store=True, copy=False, - help="Technical field for the calendar view.") + help="Date at which the mailing was or will be sent.") # don't translate 'body_arch', the translations are only on 'body_html' body_arch = fields.Html(string='Body', translate=False) body_html = fields.Html(string='Body converted to be sent by mail', sanitize_attributes=False) diff --git a/addons/mass_mailing/views/mailing_mailing_views.xml b/addons/mass_mailing/views/mailing_mailing_views.xml index c33ce1385ca..ff6a0bc46d0 100644 --- a/addons/mass_mailing/views/mailing_mailing_views.xml +++ b/addons/mass_mailing/views/mailing_mailing_views.xml @@ -31,21 +31,18 @@ 10 + - - + - - - - + + + - - + @@ -461,7 +458,7 @@ Mailings mailing.mailing - kanban,tree,form,calendar,graph + tree,kanban,form,calendar,graph [('mailing_type', '=', 'mail')] { 'search_default_assigned_to_me': 1,