mailing_trace_views.xml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- MAILING TRACE !-->
  4. <record model="ir.ui.view" id="mailing_trace_view_search">
  5. <field name="name">mailing.trace.view.search</field>
  6. <field name="model">mailing.trace</field>
  7. <field name="arch" type="xml">
  8. <search string="Mail Statistics">
  9. <field name="mail_mail_id_int"/>
  10. <field name="message_id"/>
  11. <field name="email"/>
  12. <field name="mass_mailing_id"/>
  13. <filter string="Scheduled" name="filter_scheduled" domain="[('trace_status', '=', 'outgoing')]"/>
  14. <filter string="Canceled" name="filter_canceled" domain="[('trace_status', '=', 'cancel')]"/>
  15. <filter string="Sent" name="filter_sent" domain="[('sent_datetime', '!=', False)]"/>
  16. <filter string="Clicked" name="filter_clicked" domain="[('links_click_datetime', '!=', False)]"/>
  17. <filter string="Delivered" name="filter_delivered" domain="[('sent_datetime', '!=', False), ('trace_status', 'not in', ['error', 'cancel'])]"/>
  18. <filter string="Opened" name="filter_opened" domain="[('trace_status', 'in', ['open', 'reply'])]"/>
  19. <filter string="Replied" name="filter_replied" domain="[('trace_status', '=', 'reply')]"/>
  20. <filter string="Bounced" name="filter_bounced" domain="[('trace_status', '=', 'bounce')]"/>
  21. <filter string="Failed" name="filter_failed" domain="[('trace_status', '=', 'error')]"/>
  22. <group expand="0" string="Group By">
  23. <filter string="State" name="state" domain="[]" context="{'group_by': 'trace_status'}"/>
  24. <filter string="Open Date" name="group_open_date" domain="[('trace_status', 'in', ['open', 'reply'])]" context="{'group_by': 'open_datetime:day'}"/>
  25. <filter string="Reply Date" name="group_reply_date" domain="[('trace_status', '=', 'reply')]" context="{'group_by': 'reply_datetime:day'}"/>
  26. <filter string="Last State Update" name="state_update" domain="[]" context="{'group_by': 'write_date'}"/>
  27. <filter string="Mass Mailing" name="mass_mailing" domain="[]" context="{'group_by': 'mass_mailing_id'}"/>
  28. </group>
  29. </search>
  30. </field>
  31. </record>
  32. <record id="mailing_trace_view_tree" model="ir.ui.view">
  33. <field name="name">mailing.trace.view.tree</field>
  34. <field name="model">mailing.trace</field>
  35. <field name="arch" type="xml">
  36. <tree string="Mailing Traces" create="0">
  37. <field name="mass_mailing_id"/>
  38. <field name="email"/>
  39. <field name="message_id"/>
  40. <field name="sent_datetime"/>
  41. <field name="links_click_datetime"/>
  42. <field name="trace_status" widget="badge"/>
  43. <field name="failure_type" optional="show"/>
  44. <field name="open_datetime" optional="hide"/>
  45. <field name="reply_datetime" optional="hide"/>
  46. <button name="action_view_contact" type="object"
  47. string="Open Recipient" icon="fa-user"/>
  48. </tree>
  49. </field>
  50. </record>
  51. <record id="mailing_trace_view_tree_mail" model="ir.ui.view">
  52. <field name="name">mailing.trace.view.tree.mail</field>
  53. <field name="model">mailing.trace</field>
  54. <field name="priority">20</field>
  55. <field name="arch" type="xml">
  56. <tree string="Mail Traces" create="0">
  57. <field name="mass_mailing_id"/>
  58. <field name="email"/>
  59. <field name="message_id" optional="hide"/>
  60. <field name="sent_datetime"/>
  61. <field name="links_click_datetime"/>
  62. <field name="trace_status" widget="badge"/>
  63. <field name="failure_type" optional="show"/>
  64. <field name="open_datetime" optional="hide"/>
  65. <field name="reply_datetime" optional="hide"/>
  66. <button name="action_view_contact" type="object"
  67. string="Open Recipient" icon="fa-user"/>
  68. </tree>
  69. </field>
  70. </record>
  71. <record id="mailing_trace_view_form" model="ir.ui.view">
  72. <field name="name">mailing.trace.view.form</field>
  73. <field name="model">mailing.trace</field>
  74. <field name="arch" type="xml">
  75. <form string="Mail Statistics" create="0" edit="0">
  76. <sheet>
  77. <div class="oe_button_box" name="button_box">
  78. <button name="action_view_contact"
  79. type="object" icon="fa-user" class="oe_stat_button">
  80. <span widget="statinfo">Open Recipient</span>
  81. </button>
  82. </div>
  83. <group>
  84. <group string="Status">
  85. <field name="trace_status"/>
  86. <field name="failure_type" attrs="{'invisible' : [('failure_type', '=', False)]}"/>
  87. <field name="sent_datetime" attrs="{'invisible' : [('sent_datetime', '=', False)]}"/>
  88. <field name="links_click_datetime" attrs="{'invisible' : [('links_click_datetime', '=', False)]}"/>
  89. <field name="open_datetime" attrs="{'invisible' : [('open_datetime', '=', False)]}"/>
  90. <field name="reply_datetime" attrs="{'invisible' : [('reply_datetime', '=', False)]}"/>
  91. </group>
  92. <group string="Mailing">
  93. <field name="trace_type" invisible="1"/>
  94. <field name="email" string="Recipient Address"/>
  95. <field name="mass_mailing_id"/>
  96. <field name="mail_mail_id_int" string="Mail ID" groups="base.group_no_one"/>
  97. <field name="message_id" groups="base.group_no_one"/>
  98. </group>
  99. <group string="Marketing">
  100. <field name="campaign_id" groups="mass_mailing.group_mass_mailing_campaign"/>
  101. <field name="medium_id"/>
  102. <field name="source_id"/>
  103. </group>
  104. </group>
  105. </sheet>
  106. </form>
  107. </field>
  108. </record>
  109. <record id="view_mail_mail_statistics_graph" model="ir.ui.view">
  110. <field name="name">Mail Statistics Graph</field>
  111. <field name="model">mailing.trace</field>
  112. <field name="arch" type="xml">
  113. <graph string="Mail Statistics" sample="1">
  114. <field name="write_date" interval="day"/>
  115. <field name="trace_status"/>
  116. </graph>
  117. </field>
  118. </record>
  119. <record id="mailing_trace_action" model="ir.actions.act_window">
  120. <field name="name">Mailing Traces</field>
  121. <field name="res_model">mailing.trace</field>
  122. <field name="view_mode">tree,form,graph,pivot</field>
  123. <field name="domain">[]</field>
  124. </record>
  125. <record id="action_view_mail_mail_statistics_mailing" model="ir.actions.act_window">
  126. <field name="name">Mail Statistics</field>
  127. <field name="res_model">mailing.trace</field>
  128. <field name="view_mode">graph,tree,form,pivot</field>
  129. <field name="domain">[]</field>
  130. <field name="context">{'search_default_mass_mailing_id': active_id}</field>
  131. <field name="help" type="html">
  132. <p class="o_view_nocontent_smiling_face">
  133. No data yet!
  134. </p>
  135. </field>
  136. </record>
  137. </odoo>