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.

123 lines
5.9 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. <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="date" invisible="1"/>
  63. <field name="ip"/>
  64. <field name="url"/>
  65. <field name="user_country_id" string="Country"/>
  66. <field name="os_family" string="OS"/>
  67. <field name="ua_family" string="User agent"/>
  68. </tree>
  69. </field>
  70. </record>
  71. <record model="ir.ui.view" id="view_mail_tracking_event_search">
  72. <field name="name">mail.tracking.event.search</field>
  73. <field name="model">mail.tracking.event</field>
  74. <field name="arch" type="xml">
  75. <search string="MailTracking event search">
  76. <field name="tracking_email_id" string="Message"
  77. filter_domain="[('tracking_email_id', 'ilike', self)]"/>
  78. <field name="recipient" string="Recipient"/>
  79. <field name="time" string="Time"/>
  80. <field name="date" string="Date"/>
  81. <field name="ip" string="IP"/>
  82. <field name="url" string="URL"/>
  83. <filter name="sent" string="Sent" domain="[('event_type', '=', 'sent')]"/>
  84. <filter name="delivered" string="Delivered" domain="[('event_type', '=', 'delivered')]"/>
  85. <filter name="click" string="Click" domain="[('event_type', '=', 'click')]"/>
  86. <filter name="open" string="Open" domain="[('event_type', '=', 'open')]"/>
  87. <filter name="unsub" string="Unsubscribe" domain="[('event_type', '=', 'unsub')]"/>
  88. <filter name="bounce" string="Bounce"
  89. domain="[('event_type', 'in', ('hard_bounce', 'soft_bounce'))]"/>
  90. <filter name="exception" string="Failed"
  91. domain="[('event_type', 'in', ('reject', 'spam'))]"/>
  92. <separator/>
  93. <group expand="0" string="Group By">
  94. <filter string="Type" domain="[]" context="{'group_by': 'event_type'}"/>
  95. <filter string="Message" domain="[]" context="{'group_by': 'tracking_email_id'}"/>
  96. <filter string="OS" domain="[('os_family', '!=', False)]" context="{'group_by': 'os_family'}"/>
  97. <filter string="User agent" domain="[('ua_family', '!=', False)]" context="{'group_by': 'ua_family'}"/>
  98. <filter string="User agent type" domain="[('ua_type', '!=', False)]" context="{'group_by': 'ua_type'}"/>
  99. <filter string="Country" domain="[('user_country_id', '!=', False)]" context="{'group_by': 'user_country_id'}"/>
  100. <filter string="Month" domain="[]" context="{'group_by': 'date'}"/>
  101. </group>
  102. </search>
  103. </field>
  104. </record>
  105. <record id="action_view_mail_tracking_event" model="ir.actions.act_window">
  106. <field name="name">MailTracking events</field>
  107. <field name="res_model">mail.tracking.event</field>
  108. <field name="view_type">form</field>
  109. <field name="view_mode">tree,form</field>
  110. <field name="search_view_id" ref="view_mail_tracking_event_search"/>
  111. </record>
  112. <!-- Add menu entry in Settings/Email -->
  113. <menuitem name="Tracking events" id="menu_mail_tracking_event"
  114. parent="base.menu_email"
  115. action="action_view_mail_tracking_event"/>
  116. </odoo>