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.

125 lines
6.2 KiB

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