You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
5.5 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- © 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com>
  3. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
  4. <openerp>
  5. <data>
  6. <record model="ir.ui.view" id="view_mail_tracking_event_form">
  7. <field name="name">mail.tracking.event.form</field>
  8. <field name="model">mail.tracking.event</field>
  9. <field name="arch" type="xml">
  10. <form string="MailTracking event">
  11. <sheet>
  12. <group>
  13. <group>
  14. <field name="tracking_email_id"/>
  15. <field name="recipient"/>
  16. <field name="event_type"/>
  17. </group>
  18. <group>
  19. <field name="timestamp"/>
  20. <field name="time"/>
  21. <field name="date"/>
  22. </group>
  23. </group>
  24. <group attrs="{'invisible': [('event_type', 'not in', ('sent',))]}">
  25. <field name="smtp_server"/>
  26. </group>
  27. <group attrs="{'invisible': [('event_type', 'not in', ('open', 'click'))]}">
  28. <field name="url"/>
  29. </group>
  30. <group attrs="{'invisible': [('event_type', 'not in', ('open', 'click'))]}">
  31. <group>
  32. <field name="mobile"/>
  33. <field name="ip"/>
  34. <field name="user_country_id"/>
  35. </group>
  36. <group>
  37. <field name="user_agent"/>
  38. <field name="ua_family"/>
  39. <field name="ua_type"/>
  40. <field name="os_family"/>
  41. </group>
  42. </group>
  43. </sheet>
  44. </form>
  45. </field>
  46. </record>
  47. <record model="ir.ui.view" id="view_mail_tracking_event_tree">
  48. <field name="name">mail.tracking.event.tree</field>
  49. <field name="model">mail.tracking.event</field>
  50. <field name="arch" type="xml">
  51. <tree string="MailTracking events" colors="grey:event_type in ('deferral',);black:event_type in ('sent', 'delivered');red:event_type in ('hard_bounce', 'soft_bounce', 'spam', 'reject');blue:event_type in ('unsub', 'click', 'open')">
  52. <field name="time"/>
  53. <field name="tracking_email_id"/>
  54. <field name="recipient"/>
  55. <field name="event_type"/>
  56. <field name="date" invisible="1"/>
  57. <field name="ip"/>
  58. <field name="url"/>
  59. <field name="user_country_id" string="Country"/>
  60. <field name="os_family" string="OS"/>
  61. <field name="ua_family" string="User agent"/>
  62. </tree>
  63. </field>
  64. </record>
  65. <record model="ir.ui.view" id="view_mail_tracking_event_search">
  66. <field name="name">mail.tracking.event.search</field>
  67. <field name="model">mail.tracking.event</field>
  68. <field name="arch" type="xml">
  69. <search string="MailTracking event search">
  70. <field name="tracking_email_id" string="Message"
  71. filter_domain="[('tracking_email_id', 'ilike', self)]"/>
  72. <field name="recipient" string="Recipient"/>
  73. <field name="time" string="Time"/>
  74. <field name="date" string="Date"/>
  75. <field name="ip" string="IP"/>
  76. <field name="url" string="URL"/>
  77. <filter name="sent" string="Sent" domain="[('event_type', '=', 'sent')]"/>
  78. <filter name="delivered" string="Delivered" domain="[('event_type', '=', 'delivered')]"/>
  79. <filter name="click" string="Click" domain="[('event_type', '=', 'click')]"/>
  80. <filter name="open" string="Open" domain="[('event_type', '=', 'open')]"/>
  81. <filter name="unsub" string="Unsubscribe" domain="[('event_type', '=', 'unsub')]"/>
  82. <filter name="bounce" string="Bounce"
  83. domain="[('event_type', 'in', ('hard_bounce', 'soft_bounce'))]"/>
  84. <filter name="exception" string="Failed"
  85. domain="[('event_type', 'in', ('reject', 'spam'))]"/>
  86. <separator/>
  87. <group expand="0" string="Group By">
  88. <filter string="Type" domain="[]" context="{'group_by': 'event_type'}"/>
  89. <filter string="Message" domain="[]" context="{'group_by': 'tracking_email_id'}"/>
  90. <filter string="OS" domain="[('os_family', '!=', False)]" context="{'group_by': 'os_family'}"/>
  91. <filter string="User agent" domain="[('ua_family', '!=', False)]" context="{'group_by': 'ua_family'}"/>
  92. <filter string="User agent type" domain="[('ua_type', '!=', False)]" context="{'group_by': 'ua_type'}"/>
  93. <filter string="Country" domain="[('user_country_id', '!=', False)]" context="{'group_by': 'user_country_id'}"/>
  94. <filter string="Month" domain="[]" context="{'group_by': 'date'}"/>
  95. </group>
  96. </search>
  97. </field>
  98. </record>
  99. <record id="action_view_mail_tracking_event" model="ir.actions.act_window">
  100. <field name="name">MailTracking events</field>
  101. <field name="res_model">mail.tracking.event</field>
  102. <field name="view_type">form</field>
  103. <field name="view_mode">tree,form</field>
  104. <field name="search_view_id" ref="view_mail_tracking_event_search"/>
  105. </record>
  106. <!-- Add menu entry in Settings/Email -->
  107. <menuitem name="Tracking events" id="menu_mail_tracking_event"
  108. parent="base.menu_email"
  109. action="action_view_mail_tracking_event"/>
  110. </data>
  111. </openerp>