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.

108 lines
5.0 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.ui.view" id="view_mail_mandrill_event_form">
  5. <field name="name">mail.mandrill.event.form</field>
  6. <field name="model">mail.mandrill.event</field>
  7. <field name="arch" type="xml">
  8. <form string="Mandrill email event">
  9. <sheet>
  10. <group>
  11. <group>
  12. <field name="message_id"/>
  13. <field name="event_type"/>
  14. </group>
  15. <group>
  16. <field name="timestamp"/>
  17. <field name="time"/>
  18. <field name="date"/>
  19. </group>
  20. </group>
  21. <group attrs="{'invisible': [('event_type', 'not in', ('open', 'click'))]}">
  22. <field name="url"/>
  23. </group>
  24. <group attrs="{'invisible': [('event_type', 'not in', ('open', 'click'))]}">
  25. <group>
  26. <field name="mobile"/>
  27. <field name="ip"/>
  28. <field name="user_country_id"/>
  29. </group>
  30. <group>
  31. <field name="user_agent"/>
  32. <field name="ua_family"/>
  33. <field name="ua_type"/>
  34. <field name="os_family"/>
  35. </group>
  36. </group>
  37. </sheet>
  38. </form>
  39. </field>
  40. </record>
  41. <record model="ir.ui.view" id="view_mail_mandrill_event_tree">
  42. <field name="name">mail.mandrill.event.tree</field>
  43. <field name="model">mail.mandrill.event</field>
  44. <field name="arch" type="xml">
  45. <tree string="Mandrill email 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="message_id" string="Message subject"/>
  48. <field name="event_type"/>
  49. <field name="date" invisible="1"/>
  50. <field name="ip"/>
  51. <field name="url"/>
  52. <field name="user_country_id" string="Country"/>
  53. <field name="os_family" string="OS"/>
  54. <field name="ua_family" string="User agent"/>
  55. </tree>
  56. </field>
  57. </record>
  58. <record model="ir.ui.view" id="view_mail_mandrill_event_search">
  59. <field name="name">mail.mandrill.event.search</field>
  60. <field name="model">mail.mandrill.event</field>
  61. <field name="arch" type="xml">
  62. <search string="Mandrill event Search">
  63. <field name="message_id" string="Message subject"
  64. filter_domain="[('message_id','ilike',self)]"/>
  65. <field name="message_id" string="Subject"/>
  66. <field name="time" string="Time"/>
  67. <field name="date" string="Date"/>
  68. <field name="ip" string="IP"/>
  69. <field name="url" string="URL"/>
  70. <filter name="send" string="Send" domain="[('event_type', '=', 'send')]"/>
  71. <filter name="click" string="Click" domain="[('event_type', '=', 'click')]"/>
  72. <filter name="open" string="Open" domain="[('event_type', '=', 'open')]"/>
  73. <filter name="unsub" string="Unsubscribe" domain="[('event_type', '=', 'unsub')]"/>
  74. <filter name="bounce" string="Bounce"
  75. domain="[('event_type', 'in', ('hard_bounce', 'soft_bounce'))]"/>
  76. <filter name="exception" string="Failed"
  77. domain="[('event_type', 'in', ('reject', 'spam'))]"/>
  78. <separator/>
  79. <group expand="0" string="Group By">
  80. <filter string="Type" domain="[]" context="{'group_by': 'event_type'}"/>
  81. <filter string="Message subject" domain="[]" context="{'group_by': 'message_id'}"/>
  82. <filter string="OS" domain="[('os_family', '!=', False)]" context="{'group_by': 'os_family'}"/>
  83. <filter string="User agent" domain="[('ua_family', '!=', False)]" context="{'group_by': 'ua_family'}"/>
  84. <filter string="User agent type" domain="[('ua_type', '!=', False)]" context="{'group_by': 'ua_type'}"/>
  85. <filter string="Country" domain="[('user_country_id', '!=', False)]" context="{'group_by': 'user_country_id'}"/>
  86. <filter string="Month" domain="[]" context="{'group_by': 'date'}"/>
  87. </group>
  88. </search>
  89. </field>
  90. </record>
  91. <record id="action_view_mail_mandrill_event" model="ir.actions.act_window">
  92. <field name="name">Mandrill events</field>
  93. <field name="res_model">mail.mandrill.event</field>
  94. <field name="view_type">form</field>
  95. <field name="view_mode">tree,form</field>
  96. <field name="search_view_id" ref="view_mail_mandrill_event_search"/>
  97. </record>
  98. <!-- Add menu entry in Settings/Email -->
  99. <menuitem name="Mandrill events" id="menu_mail_mandrill_event"
  100. parent="base.menu_email"
  101. action="action_view_mail_mandrill_event"/>
  102. </data>
  103. </openerp>