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.

122 lines
5.6 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_email_form">
  7. <field name="name">mail.tracking.email.form</field>
  8. <field name="model">mail.tracking.email</field>
  9. <field name="arch" type="xml">
  10. <form string="MailTracking event" create="false" edit="false" delete="false">
  11. <header>
  12. <field name="state" widget="statusbar"/>
  13. </header>
  14. <sheet>
  15. <group>
  16. <field name="name"/>
  17. </group>
  18. <group>
  19. <group>
  20. <field name="mail_message_id"/>
  21. <field name="mail_id"/>
  22. <field name="partner_id"/>
  23. <field name="recipient"/>
  24. <field name="sender"/>
  25. </group>
  26. <group>
  27. <field name="timestamp"/>
  28. <field name="time"/>
  29. <field name="date"/>
  30. </group>
  31. </group>
  32. <group attrs="{'invisible': [('bounce_type', '=', False)]}">
  33. <field name="bounce_type"/>
  34. <field name="bounce_description"/>
  35. </group>
  36. <group attrs="{'invisible': [('error_type', '=', False)]}">
  37. <field name="error_smtp_server"
  38. attrs="{'invisible': [('error_smtp_server', '=', False)]}"/>
  39. <field name="error_type"/>
  40. <field name="error_description"/>
  41. </group>
  42. <label for="tracking_event_ids"/>
  43. <div>
  44. <field name="tracking_event_ids">
  45. <tree string="Tracking events" colors="grey:event_type in ('deferral');black:event_type in ('send');red:event_type in ('hard_bounce', 'soft_bounce', 'spam', 'reject');blue:event_type in ('unsub', 'click', 'open')">
  46. <field name="time"/>
  47. <field name="event_type"/>
  48. <field name="ip"/>
  49. <field name="url"/>
  50. <field name="user_country_id" string="Country"/>
  51. <field name="os_family" string="OS"/>
  52. <field name="ua_family" string="User agent"/>
  53. </tree>
  54. </field>
  55. </div>
  56. </sheet>
  57. </form>
  58. </field>
  59. </record>
  60. <record model="ir.ui.view" id="view_mail_tracking_email_tree">
  61. <field name="name">mail.tracking.email.tree</field>
  62. <field name="model">mail.tracking.email</field>
  63. <field name="arch" type="xml">
  64. <tree string="MailTracking emails" create="false" edit="false" delete="false"
  65. colors="grey:state in (False, 'deferred');black:state in ('sent', 'delivered');green:state in ('opened');red:state in ('rejected', 'spam', 'bounced', 'soft-bounced');blue:state in ('unsub')">
  66. <field name="time"/>
  67. <field name="date" invisible="1"/>
  68. <field name="name"/>
  69. <field name="sender" string="Sender"/>
  70. <field name="recipient" string="Recipient"/>
  71. <field name="state"/>
  72. </tree>
  73. </field>
  74. </record>
  75. <record model="ir.ui.view" id="view_mail_tracking_email_search">
  76. <field name="name">mail.tracking.email.search</field>
  77. <field name="model">mail.tracking.email</field>
  78. <field name="arch" type="xml">
  79. <search string="MailTracking email search">
  80. <field name="display_name" string="Email"
  81. filter_domain="['|', ('sender', 'ilike', self), ('recipient', 'ilike', self)]"/>
  82. <field name="sender" string="Sender"/>
  83. <field name="recipient" string="Recipient"/>
  84. <field name="name" string="Subject"/>
  85. <field name="time" string="Time"/>
  86. <field name="date" string="Date"/>
  87. <filter name="sent" string="Sent" domain="[('state', 'in', ('sent',))]"/>
  88. <filter name="deferred" string="Deferred" domain="[('state', '=', 'deferred')]"/>
  89. <filter name="delivered" string="Delivered" domain="[('state', 'in', ('delivered', 'opened'))]"/>
  90. <filter name="unsub" string="Unsubscribed" domain="[('state', '=', 'unsub')]"/>
  91. <filter name="exception" string="Failed"
  92. domain="[('state', 'in', ('error', 'rejected', 'spam', 'bounced', 'soft-bounced'))]"/>
  93. <separator/>
  94. <group expand="0" string="Group By">
  95. <filter string="State" domain="[]" context="{'group_by': 'state'}"/>
  96. <filter string="Subject" domain="[]" context="{'group_by': 'name'}"/>
  97. <filter string="Sender" domain="[]" context="{'group_by': 'sender'}"/>
  98. <filter string="Month" domain="[]" context="{'group_by': 'date'}"/>
  99. </group>
  100. </search>
  101. </field>
  102. </record>
  103. <record id="action_view_mail_tracking_email" model="ir.actions.act_window">
  104. <field name="name">MailTracking emails</field>
  105. <field name="res_model">mail.tracking.email</field>
  106. <field name="view_type">form</field>
  107. <field name="view_mode">tree,form</field>
  108. <field name="search_view_id" ref="view_mail_tracking_email_search"/>
  109. </record>
  110. <!-- Add menu entry in Settings/Email -->
  111. <menuitem name="Tracking emails" id="menu_mail_tracking_email"
  112. parent="base.menu_email"
  113. action="action_view_mail_tracking_email"/>
  114. </data>
  115. </openerp>