mail_mail_views.xml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.ui.view" id="view_mail_inbox_search">
  5. <field name="name">mail.inbox.search</field>
  6. <field name="model">mail.inbox</field>
  7. <field name="arch" type="xml">
  8. <search string="Email Search">
  9. <field name="email_from" filter_domain="['|', '|',('email_from','ilike',self), ('email_to','ilike',self), ('subject','ilike',self)]" string="Email"/>
  10. <field name="date"/>
  11. <filter name="received" string="Received" domain="[('state','=','received')]"/>
  12. <filter name="outgoing" string="Outgoing" domain="[('state','=','outgoing')]"/>
  13. <filter name="sent" string="Sent" domain="[('state','=','sent')]"/>
  14. <filter name="exception" string="Failed" domain="[('state','=','exception')]"/>
  15. <separator/>
  16. <filter name="type_email" string="Email" domain="[('message_type','=','email')]"/>
  17. <filter name="type_comment" string="Comment" domain="[('message_type','=','comment')]"/>
  18. <filter name="type_notification" string="Notification" domain="[('message_type','=','notification')]"/>
  19. <group expand="0" string="Extended Filters...">
  20. <field name="author_id"/>
  21. <field name="recipient_ids"/>
  22. <field name="model"/>
  23. <field name="res_id"/>
  24. </group>
  25. <group expand="0" string="Group By">
  26. <filter string="Status" name="status" domain="[]" context="{'group_by':'state'}"/>
  27. <filter string="Author" name="author" context="{'group_by':'author_id'}"/>
  28. <filter string="Thread" name="thread" domain="[]" context="{'group_by':'message_id'}"/>
  29. <filter string="Month" name="month" help="Creation Month" domain="[]" context="{'group_by':'date'}"/>
  30. </group>
  31. </search>
  32. </field>
  33. </record>
  34. <record model="ir.ui.view" id="view_mail_inbox_tree">
  35. <field name="name">mail.inbox.tree</field>
  36. <field name="model">mail.inbox</field>
  37. <field name="arch" type="xml">
  38. <tree>
  39. <field name="date"/>
  40. <field name="create_uid"/>
  41. <field name="subject"/>
  42. <field name="author_id"/>
  43. <field name="partner_ids"/>
  44. </tree>
  45. </field>
  46. </record>
  47. <record model="ir.ui.view" id="view_mail_inbox_form">
  48. <field name="name">mail.inbox.form</field>
  49. <field name="model">mail.inbox</field>
  50. <field name="arch" type="xml">
  51. <form string="Message" edit="false">
  52. <header>
  53. <button name="send" string="Send Now" type="object" states='outgoing' class="oe_highlight"/>
  54. <button name="mark_outgoing" string="Retry" type="object" states='exception,cancel'/>
  55. <button name="cancel" string="Cancel" type="object" states='outgoing'/>
  56. <field name="state" widget="statusbar" statusbar_visible="outgoing,sent,received,exception,cancel"/>
  57. </header>
  58. <sheet>
  59. <div class="oe_title">
  60. <h1><field name="subject" placeholder="Subject..." required="True"/></h1>
  61. </div>
  62. <group col="8">
  63. <group colspan="8">
  64. <field name="partner_ids" widget="many2many_tags" invisible="1"/>
  65. <field name="email_to" required="True"/>
  66. <field name="email_cc"/>
  67. <field name="reply_to"/>
  68. <field name="template_id"
  69. domain="[('model_id.model','=','mail.inbox')]"
  70. context="{'default_model': 'mail.inbox', 'default_body_html': body_html, 'default_subject': subject, 'default_user_signature': True}"/>
  71. <field name="author_id" invisible="1"/>
  72. <field name="email_from" invisible="1"/>
  73. <field name="date" invisible="1"/>
  74. <field name="model" invisible="1"/>
  75. <field name="res_id" invisible="1"/>
  76. <field name="parent_id" invisible="1"/>
  77. <field name="subtype_id" invisible="1"/>
  78. </group>
  79. </group>
  80. <notebook>
  81. <page string="Body">
  82. <field name="body_html" widget="html" required="True"/>
  83. </page>
  84. <page string="Attachments">
  85. <field name="attachment_ids"/>
  86. </page>
  87. </notebook>
  88. </sheet>
  89. </form>
  90. </field>
  91. </record>
  92. <record id="action_mail_inbox" model="ir.actions.act_window">
  93. <field name="name">Inbox</field>
  94. <field name="type">ir.actions.act_window</field>
  95. <field name="res_model">mail.inbox</field>
  96. <field name="view_type">form</field>
  97. <field name="view_mode">tree,form</field>
  98. <field name="context">{}</field>
  99. <field name="domain">[('state', '=', 'inbox')]</field>
  100. <field name="search_view_id" ref="view_mail_inbox_search"/>
  101. </record>
  102. <record id="action_mail_draft" model="ir.actions.act_window">
  103. <field name="name">Draft</field>
  104. <field name="type">ir.actions.act_window</field>
  105. <field name="res_model">mail.inbox</field>
  106. <field name="view_type">form</field>
  107. <field name="view_mode">tree,form</field>
  108. <field name="context">{}</field>
  109. <field name="domain">[('state', '=', 'outgoing')]</field>
  110. <field name="search_view_id" ref="view_mail_inbox_search"/>
  111. </record>
  112. <record id="action_mail_outbox" model="ir.actions.act_window">
  113. <field name="name">Outbox</field>
  114. <field name="type">ir.actions.act_window</field>
  115. <field name="res_model">mail.inbox</field>
  116. <field name="view_type">form</field>
  117. <field name="view_mode">tree,form</field>
  118. <field name="context">{}</field>
  119. <field name="domain">['|',('state', '=', 'exception'),('state', '=', 'cancel')]</field>
  120. <field name="search_view_id" ref="view_mail_inbox_search"/>
  121. </record>
  122. <record id="action_mail_sent" model="ir.actions.act_window">
  123. <field name="name">Sent</field>
  124. <field name="type">ir.actions.act_window</field>
  125. <field name="res_model">mail.inbox</field>
  126. <field name="view_type">form</field>
  127. <field name="view_mode">tree,form</field>
  128. <field name="context">{}</field>
  129. <field name="domain">['|',('state', '=', 'sent'),('state', '=', 'received')]</field>
  130. <field name="search_view_id" ref="view_mail_inbox_search"/>
  131. </record>
  132. <menuitem name="Mails" id="menu_email_root"/>
  133. <menuitem id="menu_mails" name="Mails" parent="menu_email_root"/>
  134. <menuitem id="menu_mail_inbox" sequence="10" action="action_mail_inbox" parent="menu_mails" groups="base.group_user"/>
  135. <menuitem id="menu_mail_draft" sequence="20" action="action_mail_draft" parent="menu_mails" groups="base.group_user"/>
  136. <menuitem id="menu_mail_outbox" sequence="30" action="action_mail_outbox" parent="menu_mails" groups="base.group_user"/>
  137. <menuitem id="menu_mail_sent" sequence="40" action="action_mail_sent" parent="menu_mails" groups="base.group_user"/>
  138. </data>
  139. </openerp>