[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>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -31,21 +31,18 @@
|
||||
<field name="priority">10</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Mailings" sample="1" decoration-info="state in ['draft', 'in_queue']">
|
||||
<field name="calendar_date" string="Date" widget="date"/>
|
||||
<field name="subject" attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/>
|
||||
<field name="mailing_type" invisible="1"/>
|
||||
<field name="mailing_model_id" string="Recipients"/>
|
||||
<field name="mailing_model_id" string="Recipients" optional="hide"/>
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
<field name="schedule_date" string="Scheduled" widget="remaining_days"/>
|
||||
<field name="sent_date" widget="date"/>
|
||||
<field name="state" decoration-info="state == 'draft' or state == 'in_queue'" decoration-success="state == 'sending' or state == 'done'" widget="badge"/>
|
||||
<field name="campaign_id" string="Campaign"
|
||||
groups="mass_mailing.group_mass_mailing_campaign"/>
|
||||
<field name="campaign_id" string="Campaign" groups="mass_mailing.group_mass_mailing_campaign" optional="hide"/>
|
||||
<field name="sent"/>
|
||||
<field name="received_ratio" class="d-flex align-items-center pl-0 pl-lg-5" widget="progressbar" string="Delivered (%)"/>
|
||||
<field name="opened_ratio" class="d-flex align-items-center pl-0 pl-lg-5" widget="progressbar" string="Opened (%)"/>
|
||||
<field name="bounced_ratio" string="Bounced (%)"/>
|
||||
<field name="received_ratio" string="Delivered (%)"/>
|
||||
<field name="opened_ratio" string="Opened (%)"/>
|
||||
<field name="clicks_ratio" string="Clicked (%)"/>
|
||||
<field name="replied_ratio" string="Replied (%)"/>
|
||||
<field name="state" decoration-info="state == 'draft'" decoration-success="state == 'sending' or state == 'done'" widget="badge"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -461,7 +458,7 @@
|
||||
<record id="mailing_mailing_action_mail" model="ir.actions.act_window">
|
||||
<field name="name">Mailings</field>
|
||||
<field name="res_model">mailing.mailing</field>
|
||||
<field name="view_mode">kanban,tree,form,calendar,graph</field>
|
||||
<field name="view_mode">tree,kanban,form,calendar,graph</field>
|
||||
<field name="domain">[('mailing_type', '=', 'mail')]</field>
|
||||
<field name="context">{
|
||||
'search_default_assigned_to_me': 1,
|
||||
|
||||
Reference in New Issue
Block a user