<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com>
     Copyright 2017 Vicent Cubells - <vicent.cubells@tecnativa.com>
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<odoo>

<record model="ir.ui.view" id="mailing_trace_view_form">
    <field name="name">Add tracking email info</field>
    <field name="model">mailing.trace</field>
    <field name="inherit_id" ref="mass_mailing.mailing_trace_view_form" />
    <field name="arch" type="xml">
        <xpath expr="//form/sheet" position="inside">
            <group>
                <field name="mail_tracking_id" />
            </group>
            <label for="tracking_event_ids" />
            <div>
                <field name="tracking_event_ids">
                    <tree
                            decoration-muted="event_type in ('deferral')"
                            decoration-bf="event_type in ('send')"
                            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" />
                    </tree>
                </field>
            </div>
        </xpath>
    </field>
</record>

</odoo>
