mail_tracking_email_view.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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="Eventos de Seguimiento" 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="Eventos de Seguimientos" 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="País"/>
  51. <field name="os_family" string="Sistema Operativo"/>
  52. <field name="ua_family" string="Navegador"/>
  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="Seguimiento de 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="Enviado Por"/>
  70. <field name="recipient" string="Recipiente"/>
  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="Buscar Seguimientos de Eventos">
  80. <field name="display_name" string="Email"
  81. filter_domain="['|', ('sender', 'ilike', self), ('recipient', 'ilike', self)]"/>
  82. <field name="sender" string="Enviado Por"/>
  83. <field name="recipient" string="Recipiente"/>
  84. <field name="name" string="Asunto"/>
  85. <field name="time" string="Hora"/>
  86. <field name="date" string="Fecha"/>
  87. <filter name="sent" string="Enviado" domain="[('state', 'in', ('sent',))]"/>
  88. <filter name="deferred" string="Diferido" domain="[('state', '=', 'deferred')]"/>
  89. <filter name="delivered" string="Abierto" domain="[('state', 'in', ('delivered', 'opened'))]"/>
  90. <filter name="unsub" string="Desuscripto" domain="[('state', '=', 'unsub')]"/>
  91. <filter name="exception" string="Fallado"
  92. domain="[('state', 'in', ('error', 'rejected', 'spam', 'bounced', 'soft-bounced'))]"/>
  93. <separator/>
  94. <group expand="0" string="Agrupado Por">
  95. <filter string="Estado" domain="[]" context="{'group_by': 'state'}"/>
  96. <filter string="Asunto" domain="[]" context="{'group_by': 'name'}"/>
  97. <filter string="Enviado Por" domain="[]" context="{'group_by': 'sender'}"/>
  98. <filter string="Mes" 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">Seguimiento de 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="Seguimiento de Emails" id="menu_mail_tracking_email"
  112. parent="base.menu_email"
  113. action="action_view_mail_tracking_email"/>
  114. </data>
  115. </openerp>