[IMP] mass_mailing: improve ui backend
- Replace the fa-clock icon on the kanban view for the fa-calendar-check-o icon to be consistent with others modules. - When you wanted to create/edit a mail template using the web_editor, when it was open in a modal, a part of the body was behind the editor panel. Now the body is correctly display when opened in a modal. task-2198656
This commit is contained in:
@@ -294,7 +294,7 @@ class MassMailing(models.Model):
|
||||
self.write({'state': 'in_queue'})
|
||||
|
||||
def action_cancel(self):
|
||||
self.write({'state': 'draft', 'schedule_date': False})
|
||||
self.write({'state': 'draft', 'schedule_date': False, 'next_departure': False})
|
||||
|
||||
def action_retry_failed(self):
|
||||
failed_mails = self.env['mail.mail'].sudo().search([
|
||||
|
||||
@@ -199,6 +199,10 @@ body.editor_enable.o_basic_theme.o_in_iframe {
|
||||
|
||||
.oe_structure {
|
||||
width: 100%;
|
||||
@media (max-width: map-get($grid-breakpoints, 'lg')) {
|
||||
width: auto;
|
||||
margin-left: $o-we-sidebar-width;
|
||||
}
|
||||
}
|
||||
|
||||
:root {
|
||||
|
||||
@@ -277,6 +277,8 @@
|
||||
<field name='mailing_model_id'/>
|
||||
<field name='mailing_model_name'/>
|
||||
<field name='sent_date'/>
|
||||
<field name='schedule_date'/>
|
||||
<field name='next_departure'/>
|
||||
<field name='active'/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
@@ -322,13 +324,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_kanban_record_body" t-if="!selection_mode" attrs="{'invisible': [('sent_date', '=', False)]}">
|
||||
<div class="o_kanban_record_body" t-if="!selection_mode" attrs="{'invisible': [('sent_date', '=', False), ('schedule_date', '=', False), ('state', '!=', 'in_queue')]}">
|
||||
<div>
|
||||
<b><field name="delivered"/> / <field name="expected"/></b> Delivered to
|
||||
<span attrs="{'invisible': [('sent_date', '=', False)]}"><b><field name="delivered"/> / <field name="expected"/></b> Delivered to</span>
|
||||
<span attrs="{'invisible': [('sent_date', '!=', False)]}"><b><field name='total'/></b></span>
|
||||
<field name='mailing_model_id' attrs="{'invisible': [('mailing_model_name','=','mailing.list')]}"/>
|
||||
<span attrs="{'invisible': [('mailing_model_name','!=','mailing.list')]}">Mailing Contact</span>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div attrs="{'invisible': [('sent_date', '=', False)]}" class="d-flex justify-content-between">
|
||||
<div name="stat_opened">
|
||||
<b><field name="opened_ratio" />%</b> Opened
|
||||
</div>
|
||||
@@ -342,15 +345,24 @@
|
||||
</div>
|
||||
</div>
|
||||
<div name="div_responsible_avatar">
|
||||
<span attrs="{'invisible': [('sent_date', '=', False)]}">
|
||||
<span class="fa fa-clock-o text-muted mr-2" aria-label="Sent date"/>
|
||||
<field name="sent_date" widget="date"/>
|
||||
<span attrs="{'invisible': [('sent_date', '=', False)]}" t-attf-title="Sent on #{record.sent_date.value}" class="d-inline-flex">
|
||||
<span class="fa fa-calendar-check-o mr-2 small my-auto" aria-label="Sent date"/>
|
||||
<span class="align-self-baseline"><field name="sent_date" widget="date"/></span>
|
||||
</span>
|
||||
<span attrs="{'invisible': [('sent_date', '!=', False)]}" class="oe_clear text-muted">
|
||||
<field name='total'/>
|
||||
<span attrs="{'invisible': [('schedule_date', '=', False)]}" t-attf-title="Scheduled on #{record.schedule_date.value}" class="d-inline-flex">
|
||||
<span class="fa fa-hourglass-half mr-2 small my-auto" aria-label="Scheduled date"/>
|
||||
<span class="align-self-baseline"><field name="schedule_date" widget="date"/></span>
|
||||
</span>
|
||||
<span attrs="{'invisible': ['|', '|', ('sent_date', '!=', False), ('schedule_date', '!=', False), ('state', '=', 'in_queue')]}" class="oe_clear">
|
||||
<b><field name='total'/></b>
|
||||
<field name='mailing_model_id' attrs="{'invisible': [('mailing_model_name','=','mailing.list')]}"/>
|
||||
<span attrs="{'invisible': [('mailing_model_name','!=','mailing.list')]}">Mailing Contact</span>
|
||||
</span>
|
||||
<span attrs="{'invisible': ['|', '|', ('schedule_date', '!=', False), ('state', '!=', 'in_queue'), ('next_departure', '=', False)]}"
|
||||
t-attf-title="Scheduled on #{record.next_departure.value}" class="d-inline-flex">
|
||||
<span class="fa fa-hourglass-o mr-2 small my-auto" aria-label="Scheduled date"/>
|
||||
<span class="align-self-baseline">Next Batch</span>
|
||||
</span>
|
||||
<t t-set="unassigned"><t t-esc="_t('Unassigned')"/></t>
|
||||
<img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value || unassigned" t-att-alt="record.user_id.value" class="o_image_24_cover oe_kanban_avatar float-right"/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user