2021-01-26 15:06:17 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
2018-03-19 16:41:26 +01:00
|
|
|
<!-- Copyright 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com>
|
2016-06-14 17:22:17 +02:00
|
|
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
|
2016-09-09 18:33:21 +02:00
|
|
|
<odoo>
|
2016-06-14 17:22:17 +02:00
|
|
|
|
|
|
|
<record model="ir.ui.view" id="view_mail_tracking_email_form">
|
|
|
|
<field name="name">mail.tracking.email.form</field>
|
|
|
|
<field name="model">mail.tracking.email</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form string="MailTracking event" create="false" edit="false" delete="false">
|
|
|
|
<header>
|
2021-01-26 15:06:17 +01:00
|
|
|
<field name="state" widget="statusbar" />
|
2016-06-14 17:22:17 +02:00
|
|
|
</header>
|
|
|
|
<sheet>
|
|
|
|
<group>
|
2021-01-26 15:06:17 +01:00
|
|
|
<field name="name" />
|
2016-06-14 17:22:17 +02:00
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<group>
|
2021-01-26 15:06:17 +01:00
|
|
|
<field name="mail_message_id" />
|
|
|
|
<field name="mail_id" />
|
|
|
|
<field name="partner_id" />
|
|
|
|
<field name="recipient" />
|
|
|
|
<field name="sender" />
|
2016-06-14 17:22:17 +02:00
|
|
|
</group>
|
|
|
|
<group>
|
2021-01-26 15:06:17 +01:00
|
|
|
<field name="timestamp" />
|
|
|
|
<field name="time" />
|
|
|
|
<field name="date" />
|
2016-06-14 17:22:17 +02:00
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
<group attrs="{'invisible': [('bounce_type', '=', False)]}">
|
2021-01-26 15:06:17 +01:00
|
|
|
<field name="bounce_type" />
|
|
|
|
<field name="bounce_description" />
|
2016-06-14 17:22:17 +02:00
|
|
|
</group>
|
|
|
|
<group attrs="{'invisible': [('error_type', '=', False)]}">
|
2021-01-26 15:06:17 +01:00
|
|
|
<field
|
|
|
|
name="error_smtp_server"
|
|
|
|
attrs="{'invisible': [('error_smtp_server', '=', False)]}"
|
|
|
|
/>
|
|
|
|
<field name="error_type" />
|
|
|
|
<field name="error_description" />
|
2016-06-14 17:22:17 +02:00
|
|
|
</group>
|
2021-01-26 15:06:17 +01:00
|
|
|
<label for="tracking_event_ids" />
|
2016-06-14 17:22:17 +02:00
|
|
|
<div>
|
|
|
|
<field name="tracking_event_ids">
|
2021-01-26 15:06:17 +01:00
|
|
|
<tree
|
|
|
|
string="Tracking events"
|
|
|
|
decoration-muted="event_type == 'deferral'"
|
|
|
|
decoration-danger="event_type in ('hard_bounce', 'soft_bounce', 'spam', 'reject')"
|
|
|
|
decoration-info="event_type in ('unsub', 'click', 'open')"
|
|
|
|
>
|
|
|
|
<field name="time" />
|
|
|
|
<field name="event_type" />
|
|
|
|
<field name="ip" />
|
|
|
|
<field name="url" />
|
|
|
|
<field name="user_country_id" string="Country" />
|
|
|
|
<field name="os_family" string="OS" />
|
|
|
|
<field name="ua_family" string="User agent" />
|
2016-06-14 17:22:17 +02:00
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</div>
|
|
|
|
</sheet>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record model="ir.ui.view" id="view_mail_tracking_email_tree">
|
|
|
|
<field name="name">mail.tracking.email.tree</field>
|
|
|
|
<field name="model">mail.tracking.email</field>
|
|
|
|
<field name="arch" type="xml">
|
2021-01-26 15:06:17 +01:00
|
|
|
<tree
|
|
|
|
string="MailTracking emails"
|
|
|
|
create="false"
|
|
|
|
edit="false"
|
|
|
|
delete="false"
|
|
|
|
decoration-muted="state in (False, 'deferred')"
|
|
|
|
decoration-success="state == 'opened'"
|
|
|
|
decoration-danger="state in ('rejected', 'spam', 'bounced', 'soft-bounced', 'error')"
|
|
|
|
decoration-info="state == 'unsub'"
|
|
|
|
>
|
|
|
|
<field name="time" />
|
|
|
|
<field name="date" invisible="1" />
|
|
|
|
<field name="name" />
|
|
|
|
<field name="sender" string="Sender" />
|
|
|
|
<field name="recipient" string="Recipient" />
|
|
|
|
<field name="state" />
|
2016-06-14 17:22:17 +02:00
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record model="ir.ui.view" id="view_mail_tracking_email_search">
|
|
|
|
<field name="name">mail.tracking.email.search</field>
|
|
|
|
<field name="model">mail.tracking.email</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<search string="MailTracking email search">
|
2021-01-26 15:06:17 +01:00
|
|
|
<field
|
|
|
|
name="display_name"
|
|
|
|
string="Email"
|
|
|
|
filter_domain="['|', ('sender', 'ilike', self), ('recipient', 'ilike', self)]"
|
|
|
|
/>
|
2021-08-13 17:07:40 +02:00
|
|
|
<field
|
|
|
|
name="sender"
|
|
|
|
string="Sender"
|
2021-09-22 23:26:55 +02:00
|
|
|
filter_domain="[('sender', 'ilike', self)]"
|
2021-08-13 17:07:40 +02:00
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="recipient"
|
|
|
|
string="Recipient"
|
2021-09-22 23:26:55 +02:00
|
|
|
filter_domain="[('recipient', 'ilike', self)]"
|
2021-08-13 17:07:40 +02:00
|
|
|
/>
|
2021-01-26 15:06:17 +01:00
|
|
|
<field name="name" string="Subject" />
|
|
|
|
<field name="time" string="Time" />
|
|
|
|
<field name="date" string="Date" />
|
|
|
|
<filter name="sent" string="Sent" domain="[('state', 'in', ('sent',))]" />
|
|
|
|
<filter
|
|
|
|
name="deferred"
|
|
|
|
string="Deferred"
|
|
|
|
domain="[('state', '=', 'deferred')]"
|
|
|
|
/>
|
|
|
|
<filter
|
|
|
|
name="delivered"
|
|
|
|
string="Delivered"
|
|
|
|
domain="[('state', 'in', ('delivered', 'opened'))]"
|
|
|
|
/>
|
|
|
|
<filter
|
|
|
|
name="unsub"
|
|
|
|
string="Unsubscribed"
|
|
|
|
domain="[('state', '=', 'unsub')]"
|
|
|
|
/>
|
|
|
|
<filter
|
|
|
|
name="exception"
|
|
|
|
string="Failed"
|
|
|
|
domain="[('state', 'in', ('error', 'rejected', 'spam', 'bounced', 'soft-bounced'))]"
|
|
|
|
/>
|
|
|
|
<separator />
|
2016-06-14 17:22:17 +02:00
|
|
|
<group expand="0" string="Group By">
|
2021-01-26 15:06:17 +01:00
|
|
|
<filter
|
|
|
|
string="State"
|
|
|
|
name="group_by_state"
|
|
|
|
domain="[]"
|
|
|
|
context="{'group_by': 'state'}"
|
|
|
|
/>
|
|
|
|
<filter
|
|
|
|
string="Subject"
|
|
|
|
name="group_by_subject"
|
|
|
|
domain="[]"
|
|
|
|
context="{'group_by': 'name'}"
|
|
|
|
/>
|
|
|
|
<filter
|
|
|
|
string="Sender"
|
|
|
|
name="group_by_sender"
|
|
|
|
domain="[]"
|
|
|
|
context="{'group_by': 'sender'}"
|
|
|
|
/>
|
|
|
|
<filter
|
|
|
|
string="Month"
|
|
|
|
name="group_by_month"
|
|
|
|
domain="[]"
|
|
|
|
context="{'group_by': 'date'}"
|
|
|
|
/>
|
2016-06-14 17:22:17 +02:00
|
|
|
</group>
|
|
|
|
</search>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
|
|
|
|
<record id="action_view_mail_tracking_email" model="ir.actions.act_window">
|
|
|
|
<field name="name">MailTracking emails</field>
|
|
|
|
<field name="res_model">mail.tracking.email</field>
|
|
|
|
<field name="view_mode">tree,form</field>
|
2021-01-26 15:06:17 +01:00
|
|
|
<field name="search_view_id" ref="view_mail_tracking_email_search" />
|
2016-06-14 17:22:17 +02:00
|
|
|
</record>
|
|
|
|
|
|
|
|
<!-- Add menu entry in Settings/Email -->
|
2021-01-26 15:06:17 +01:00
|
|
|
<menuitem
|
|
|
|
name="Tracking emails"
|
|
|
|
id="menu_mail_tracking_email"
|
|
|
|
parent="base.menu_email"
|
|
|
|
action="action_view_mail_tracking_email"
|
|
|
|
/>
|
2016-06-14 17:22:17 +02:00
|
|
|
|
2016-09-09 18:33:21 +02:00
|
|
|
</odoo>
|