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.

113 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_message_form">
  5. <field name="name">mail.mandrill.message.form</field>
  6. <field name="model">mail.mandrill.message</field>
  7. <field name="arch" type="xml">
  8. <form string="Mandrill email message">
  9. <header>
  10. <field name="state" widget="statusbar"/>
  11. </header>
  12. <sheet>
  13. <group>
  14. <field name="name"/>
  15. <field name="tags"/>
  16. </group>
  17. <group>
  18. <group>
  19. <field name="mandrill_id"/>
  20. <field name="recipient"/>
  21. <field name="sender"/>
  22. </group>
  23. <group>
  24. <field name="timestamp"/>
  25. <field name="time"/>
  26. <field name="date"/>
  27. </group>
  28. </group>
  29. <group attrs="{'invisible': [('bounce_type', '=', False)]}">
  30. <field name="bounce_type"/>
  31. <field name="bounce_description"/>
  32. </group>
  33. <label for="metadata"/>
  34. <div>
  35. <field name="metadata"/>
  36. </div>
  37. <label for="event_ids"/>
  38. <div>
  39. <field name="event_ids">
  40. <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')">
  41. <field name="time"/>
  42. <field name="event_type"/>
  43. <field name="ip"/>
  44. <field name="url"/>
  45. <field name="user_country_id" string="Country"/>
  46. <field name="os_family" string="OS"/>
  47. <field name="ua_family" string="User agent"/>
  48. </tree>
  49. </field>
  50. </div>
  51. </sheet>
  52. </form>
  53. </field>
  54. </record>
  55. <record model="ir.ui.view" id="view_mail_mandrill_message_tree">
  56. <field name="name">mail.mandrill.message.tree</field>
  57. <field name="model">mail.mandrill.message</field>
  58. <field name="arch" type="xml">
  59. <tree string="Mandrill emails" colors="grey:state in (False, 'deferred');black:state in ('sent');green:state in ('opened');red:state in ('rejected', 'spam', 'bounced', 'soft-bounced');blue:state in ('unsub')">
  60. <field name="state" invisible="1"/>
  61. <field name="time"/>
  62. <field name="date" invisible="1"/>
  63. <field name="name"/>
  64. <field name="sender" string="Sender"/>
  65. <field name="recipient" string="Recipient"/>
  66. <field name="tags" string="Tags"/>
  67. </tree>
  68. </field>
  69. </record>
  70. <record model="ir.ui.view" id="view_mail_mandrill_message_search">
  71. <field name="name">mail.mandrill.message.search</field>
  72. <field name="model">mail.mandrill.message</field>
  73. <field name="arch" type="xml">
  74. <search string="Mandrill email Search">
  75. <field name="sender" string="Email"
  76. filter_domain="['|', ('sender','ilike',self), ('recipient','ilike',self)]"/>
  77. <field name="name" string="Subject"/>
  78. <field name="time" string="Time"/>
  79. <field name="date" string="Date"/>
  80. <filter name="deferred" string="Deferred" domain="[('state', '=', 'deferred')]"/>
  81. <filter name="sent" string="Sent" domain="[('state', 'in', ('sent', 'opened'))]"/>
  82. <filter name="unsub" string="Unsubscribed" domain="[('state', '=', 'unsub')]"/>
  83. <filter name="exception" string="Failed"
  84. domain="[('state', 'in', ('rejected', 'spam', 'bounced', 'soft-bounced'))]"/>
  85. <separator/>
  86. <group expand="0" string="Group By">
  87. <filter string="State" domain="[]" context="{'group_by': 'state'}"/>
  88. <filter string="Subject" domain="[]" context="{'group_by': 'name'}"/>
  89. <filter string="Sender" domain="[]" context="{'group_by': 'sender'}"/>
  90. <filter string="Month" domain="[]" context="{'group_by': 'date'}"/>
  91. </group>
  92. </search>
  93. </field>
  94. </record>
  95. <record id="action_view_mail_mandrill_message" model="ir.actions.act_window">
  96. <field name="name">Mandrill emails</field>
  97. <field name="res_model">mail.mandrill.message</field>
  98. <field name="view_type">form</field>
  99. <field name="view_mode">tree,form</field>
  100. <field name="search_view_id" ref="view_mail_mandrill_message_search"/>
  101. </record>
  102. <!-- Add menu entry in Settings/Email -->
  103. <menuitem name="Mandrill emails" id="menu_mail_mandrill_message"
  104. parent="base.menu_email"
  105. action="action_view_mail_mandrill_message"/>
  106. </data>
  107. </openerp>