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.

127 lines
6.0 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" create="false" edit="false" delete="false">
  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. <group string="Error"
  44. attrs="{'invisible': [('error_type', '=', False)]}">
  45. <field name="error_type"/>
  46. <field name="error_description"/>
  47. <field name="error_details"/>
  48. </group>
  49. </sheet>
  50. </form>
  51. </field>
  52. </record>
  53. <record model="ir.ui.view" id="view_mail_tracking_event_tree">
  54. <field name="name">mail.tracking.event.tree</field>
  55. <field name="model">mail.tracking.event</field>
  56. <field name="arch" type="xml">
  57. <tree string="MailTracking events" create="false" edit="false" delete="false"
  58. 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')">
  59. <field name="time"/>
  60. <field name="tracking_email_id"/>
  61. <field name="recipient"/>
  62. <field name="event_type"/>
  63. <field name="error_details" invisible="not context.get('event_error_filter', False)"/>
  64. <field name="date" invisible="1"/>
  65. <field name="ip"/>
  66. <field name="url"/>
  67. <field name="user_country_id" string="Country"/>
  68. <field name="os_family" string="OS"/>
  69. <field name="ua_family" string="User agent"/>
  70. </tree>
  71. </field>
  72. </record>
  73. <record model="ir.ui.view" id="view_mail_tracking_event_search">
  74. <field name="name">mail.tracking.event.search</field>
  75. <field name="model">mail.tracking.event</field>
  76. <field name="arch" type="xml">
  77. <search string="MailTracking event search">
  78. <field name="tracking_email_id" string="Message"
  79. filter_domain="[('tracking_email_id', 'ilike', self)]"/>
  80. <field name="recipient" string="Recipient"/>
  81. <field name="time" string="Time"/>
  82. <field name="date" string="Date"/>
  83. <field name="ip" string="IP"/>
  84. <field name="url" string="URL"/>
  85. <filter name="sent" string="Sent" domain="[('event_type', '=', 'sent')]"/>
  86. <filter name="delivered" string="Delivered" domain="[('event_type', '=', 'delivered')]"/>
  87. <filter name="click" string="Click" domain="[('event_type', '=', 'click')]"/>
  88. <filter name="open" string="Open" domain="[('event_type', '=', 'open')]"/>
  89. <filter name="unsub" string="Unsubscribe" domain="[('event_type', '=', 'unsub')]"/>
  90. <filter name="bounce" string="Bounce"
  91. domain="[('event_type', 'in', ('hard_bounce', 'soft_bounce'))]"/>
  92. <filter name="exception" string="Failed"
  93. domain="[('event_type', 'in', ('reject', 'spam'))]"
  94. context="{'event_error_filter': True}"/>
  95. <separator/>
  96. <group expand="0" string="Group By">
  97. <filter string="Type" domain="[]" context="{'group_by': 'event_type'}"/>
  98. <filter string="Message" domain="[]" context="{'group_by': 'tracking_email_id'}"/>
  99. <filter string="OS" domain="[('os_family', '!=', False)]" context="{'group_by': 'os_family'}"/>
  100. <filter string="User agent" domain="[('ua_family', '!=', False)]" context="{'group_by': 'ua_family'}"/>
  101. <filter string="User agent type" domain="[('ua_type', '!=', False)]" context="{'group_by': 'ua_type'}"/>
  102. <filter string="Country" domain="[('user_country_id', '!=', False)]" context="{'group_by': 'user_country_id'}"/>
  103. <filter string="Month" domain="[]" context="{'group_by': 'date'}"/>
  104. </group>
  105. </search>
  106. </field>
  107. </record>
  108. <record id="action_view_mail_tracking_event" model="ir.actions.act_window">
  109. <field name="name">MailTracking events</field>
  110. <field name="res_model">mail.tracking.event</field>
  111. <field name="view_type">form</field>
  112. <field name="view_mode">tree,form</field>
  113. <field name="search_view_id" ref="view_mail_tracking_event_search"/>
  114. </record>
  115. <!-- Add menu entry in Settings/Email -->
  116. <menuitem name="Tracking events" id="menu_mail_tracking_event"
  117. parent="base.menu_email"
  118. action="action_view_mail_tracking_event"/>
  119. </data>
  120. </openerp>