-
-
Notifications
You must be signed in to change notification settings - Fork 623
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] mail_tracking: migration to 16.0
- Loading branch information
Showing
25 changed files
with
602 additions
and
609 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,13 @@ | |
<field name="body"><![CDATA[<p>This is a message with CC</p>]]></field> | ||
<field name="email_from">[email protected]</field> | ||
<field name="author_id" ref="base.res_partner_1" /> | ||
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_demo')])]" /> | ||
<field | ||
name="partner_ids" | ||
eval="[Command.set([ref('base.partner_demo')])]" | ||
/> | ||
<field | ||
name="notification_ids" | ||
eval="[(0, 0, {'res_partner_id': ref('base.partner_demo')})]" | ||
eval="[Command.create({'res_partner_id': ref('base.partner_demo')})]" | ||
/> | ||
<field name="subject">Message with CC</field> | ||
</record> | ||
|
@@ -41,10 +44,13 @@ | |
<field name="body"><![CDATA[<p>This is a failed message</p>]]></field> | ||
<field name="email_from">[email protected]</field> | ||
<field name="author_id" ref="base.res_partner_1" /> | ||
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_demo')])]" /> | ||
<field | ||
name="partner_ids" | ||
eval="[Command.set([ref('base.partner_demo')])]" | ||
/> | ||
<field | ||
name="notification_ids" | ||
eval="[(0, 0, {'res_partner_id': ref('base.partner_demo')})]" | ||
eval="[Command.create({'res_partner_id': ref('base.partner_demo')})]" | ||
/> | ||
<field name="subject">Failed Message</field> | ||
</record> | ||
|
@@ -69,10 +75,13 @@ | |
<field name="body"><![CDATA[<p>This is another failed message</p>]]></field> | ||
<field name="email_from">[email protected]</field> | ||
<field name="author_id" ref="base.res_partner_10" /> | ||
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_demo')])]" /> | ||
<field | ||
name="partner_ids" | ||
eval="[Command.set([ref('base.partner_demo')])]" | ||
/> | ||
<field | ||
name="notification_ids" | ||
eval="[(0, 0, {'res_partner_id': ref('base.partner_demo')})]" | ||
eval="[Command.create({'res_partner_id': ref('base.partner_demo')})]" | ||
/> | ||
<field name="subject">Failed Message</field> | ||
</record> | ||
|
@@ -97,10 +106,13 @@ | |
<field name="body"><![CDATA[<p>This is another failed message</p>]]></field> | ||
<field name="email_from">[email protected]</field> | ||
<field name="author_id" ref="base.partner_admin" /> | ||
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_demo')])]" /> | ||
<field | ||
name="partner_ids" | ||
eval="[Command.set([ref('base.partner_demo')])]" | ||
/> | ||
<field | ||
name="notification_ids" | ||
eval="[(0, 0, {'res_partner_id': ref('base.partner_demo')})]" | ||
eval="[Command.create({'res_partner_id': ref('base.partner_demo')})]" | ||
/> | ||
<field name="subject">Failed Message</field> | ||
</record> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<templates xml:space="preserve"> | ||
|
||
<t t-inherit="mail.DiscussSidebar" t-inherit-mode="extension"> | ||
<xpath | ||
expr="//div[hasclass('o_DiscussSidebar_categoryMailbox')]" | ||
position="inside" | ||
> | ||
<DiscussSidebarMailbox record="discussView.failedMessageView" /> | ||
</xpath> | ||
</t> | ||
|
||
<t t-inherit="mail.MessageList" t-inherit-mode="extension"> | ||
<t | ||
t-elif="messageListView.threadViewOwner.thread === messaging.history.thread" | ||
position="after" | ||
> | ||
<t | ||
t-elif="messageListView.threadViewOwner.thread === messaging.failedmsg.thread" | ||
> | ||
<div class="o_MessageList_emptyTitle o-neutral-face-icon"> | ||
No failed messages | ||
</div> | ||
Failed messages will be appeared here. | ||
</t> | ||
</t> | ||
</t> | ||
|
||
<t t-inherit="mail.ThreadIcon" t-inherit-mode="extension"> | ||
<xpath | ||
expr="//t[@t-elif='thread.mailbox === messaging.history']" | ||
position="after" | ||
> | ||
<t t-elif="thread.mailbox === messaging.failedmsg"> | ||
<div class="o_ThreadIcon_mailboxModeration fa fa-fw fa-exclamation" /> | ||
</t> | ||
</xpath> | ||
</t> | ||
|
||
<t t-name="mail.tracking.status" owl="1"> | ||
<t t-if="tracking['isCc']"> | ||
<span class="mail_tracking_cc"> | ||
<i class="fa fa-cc" /> | ||
</span> | ||
</t> | ||
<t t-elif="!tracking['isCc'] && !tracking['partner_id']"> | ||
<span class="mail_anon_recipient"> | ||
<i class="fa fa-low-vision" /> | ||
</span> | ||
</t> | ||
<t t-elif="tracking['status'] === 'unknown'"> | ||
<span class="mail_tracking_unknown"> | ||
<i class="fa fa-ban" /> | ||
</span> | ||
</t> | ||
<t t-elif="tracking['status'] === 'waiting'"> | ||
<span class="mail_tracking_waiting mail_tracking_pointer"> | ||
<i class="fa fa-clock-o" /> | ||
</span> | ||
</t> | ||
<t t-elif="tracking['status'] === 'error'"> | ||
<span class="mail_tracking_error mail_tracking_pointer"> | ||
<i | ||
t-if="tracking['error_type'] === 'no_recipient'" | ||
class="fa fa-user-times" | ||
/> | ||
<i t-else="" class="fa fa-remove" /> | ||
</span> | ||
</t> | ||
<t t-elif="tracking['status'] === 'sent'"> | ||
<span class="mail_tracking_sent mail_tracking_pointer"> | ||
<i class="fa fa-check" /> | ||
</span> | ||
</t> | ||
<t t-elif="tracking['status'] === 'delivered'"> | ||
<span class="fa-stack mail_tracking_delivered mail_tracking_pointer"> | ||
<i class="fa fa-check fa-stack-1x" style="margin-left:1px" /> | ||
<i | ||
class="fa fa-check fa-inverse fa-stack-1x" | ||
style="margin-left:-2px;" | ||
/> | ||
<i class="fa fa-check fa-stack-1x" style="margin-left:-3px" /> | ||
</span> | ||
</t> | ||
<t t-elif="tracking['status'] === 'opened'"> | ||
<span class="fa-stack mail_tracking_opened mail_tracking_pointer"> | ||
<i class="fa fa-check fa-stack-1x" style="margin-left:1px" /> | ||
<i | ||
class="fa fa-check fa-inverse fa-stack-1x" | ||
style="margin-left:-2px;" | ||
/> | ||
<i class="fa fa-check fa-stack-1x" style="margin-left:-3px" /> | ||
</span> | ||
</t> | ||
</t> | ||
|
||
<t t-inherit="mail.Message" t-inherit-mode="extension"> | ||
<xpath expr="//div[hasclass('o_Message_header')]" position="inside"> | ||
<t t-if="messageView.message.isFailed"> | ||
<span t-attf-class="o_thread_icons"> | ||
<a | ||
href="#" | ||
class="btn btn-link btn-success o_thread_icon text-muted btn-sm o_failed_message_reviewed o_activity_link" | ||
t-on-click="_onMarkFailedMessageReviewed" | ||
t-att-data-message-id="messageView.message.id" | ||
> | ||
<i class="fa fa-check" /> | ||
Set as Reviewed | ||
</a> | ||
<a | ||
href="#" | ||
class="btn btn-link btn-success o_thread_icon text-muted btn-sm o_failed_message_retry o_activity_link" | ||
t-on-click="_onRetryFailedMessage" | ||
t-att-data-message-id="messageView.message.id" | ||
> | ||
<i class="fa fa-retweet" /> | ||
Retry | ||
</a> | ||
</span> | ||
</t> | ||
</xpath> | ||
</t> | ||
|
||
<t | ||
t-name="mail.MessageTracking" | ||
t-inherit="mail.Message" | ||
t-inherit-mode="extension" | ||
> | ||
<xpath expr="//div[hasclass('o_Message_header')]" position="after"> | ||
<t | ||
t-if="messageView.message.hasPartnerTrackings() || messageView.message.hasEmailCc()" | ||
> | ||
<p class="o_mail_tracking"> | ||
<strong>To:</strong> | ||
<t | ||
t-foreach="messageView.message.getPartnerTrackings()" | ||
t-as="tracking" | ||
t-key="tracking_index" | ||
> | ||
<t t-if="!tracking_first"> | ||
- | ||
</t> | ||
<t t-if="tracking['partner_id']"> | ||
<a | ||
t-attf-class="o_mail_action_tracking_partner #{tracking['isCc'] ? 'o_mail_cc' : ''}" | ||
t-att-data-partner="tracking['partner_id']" | ||
t-attf-href="#model=res.partner&id={{tracking['partner_id']}}" | ||
> | ||
<t t-esc="tracking['recipient']" /> | ||
</a> | ||
</t> | ||
<t t-else=""> | ||
<span t-attf-class="#{tracking['isCc'] ? 'o_mail_cc' : ''}"> | ||
<t t-esc="tracking['recipient']" /> | ||
</span> | ||
</t> | ||
<t | ||
t-if="tracking['status'] === 'error' && tracking['error_type'] === 'no_recipient'" | ||
t-set="title_status" | ||
t-value="tracking['error_description']" | ||
/> | ||
<t | ||
t-else="" | ||
t-set="title_status" | ||
t-value="tracking['status_human']" | ||
/> | ||
<span | ||
class="mail_tracking o_mail_action_tracking_status" | ||
t-att-data-tracking="tracking['tracking_id']" | ||
t-att-title="title_status" | ||
type="button" | ||
t-on-click="_onTrackingStatusClick" | ||
> | ||
<t t-call="mail.tracking.status" /> | ||
</span> | ||
</t> | ||
</p> | ||
</t> | ||
|
||
</xpath> | ||
</t> | ||
|
||
</templates> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.