4 <record model="ir.ui.view" id="view_mail_form">
5 <field name="name">mail.mail.form</field>
6 <field name="model">mail.mail</field>
7 <field name="arch" type="xml">
8 <form string="Email message" version="7.0">
10 <label for="subject" class="oe_edit_only"/>
11 <h2><field name="subject"/></h2>
13 by <field name="author_id" class="oe_inline" string="User"/> on <field name="date" class="oe_inline"/>
14 <button name="%(action_email_compose_message_wizard)d" string="Reply" type="action" icon="terp-mail-replied"
15 context="{'default_composition_mode':'reply', 'default_parent_id': active_id}" states='received,sent,exception,cancel'/>
18 <field name="email_from"/>
19 <field name="email_to"/>
20 <field name="recipient_ids" widget="many2many_tags"/>
21 <field name="email_cc"/>
22 <field name="reply_to"/>
26 <field name="body_html"/>
28 <page string="Advanced" groups="base.group_no_one">
31 <field name="auto_delete"/>
34 <field name="mail_server_id"/>
36 <field name="res_id"/>
39 <field name="message_id"/>
40 <field name="references"/>
41 <field name="partner_ids" widget="many2many_tags"/>
42 <field name="notified_partner_ids" widget="many2many_tags"/>
46 <page string="Attachments">
47 <field name="attachment_ids"/>
55 <record model="ir.ui.view" id="view_mail_tree">
56 <field name="name">mail.mail.tree</field>
57 <field name="model">mail.mail</field>
58 <field name="arch" type="xml">
59 <tree string="Emails" colors="grey:state in ('sent', 'cancel');blue:state=='outgoing';red:state=='exception';black:state=='received'">
61 <field name="subject"/>
62 <field name="author_id" string="User"/>
63 <field name="message_id" invisible="1"/>
64 <field name="recipient_ids" invisible="1"/>
65 <field name="model" invisible="1"/>
66 <field name="res_id" invisible="1"/>
67 <field name="email_from" invisible="1"/>
68 <field name="state" invisible="1"/>
69 <field name="type" invisible="1"/>
70 <button name="send" string="Send Now" type="object" icon="gtk-media-play" states='outgoing'/>
71 <button name="mark_outgoing" string="Retry" type="object" icon="gtk-redo" states='exception,cancel'/>
72 <button name="cancel" string="Cancel Email" type="object" icon="terp-gtk-stop" states='outgoing'/>
77 <record model="ir.ui.view" id="view_mail_search">
78 <field name="name">mail.mail.search</field>
79 <field name="model">mail.mail</field>
80 <field name="arch" type="xml">
81 <search string="Email Search">
82 <field name="email_from" filter_domain="['|' '|',('email_from','ilike',self), ('email_to','ilike',self), ('subject','ilike',self)]" string="Email"/>
84 <filter icon="terp-camera_test" name="received" string="Received" domain="[('state','=','received')]"/>
85 <filter icon="terp-call-start" name="outgoing" string="Outgoing" domain="[('state','=','outgoing')]"/>
86 <filter icon="terp-check" name="sent" string="Sent" domain="[('state','=','sent')]"/>
87 <filter icon="terp-gtk-stop" name="exception" string="Failed" domain="[('state','=','exception')]"/>
89 <filter icon="terp-camera_test" name="type_email" string="Email" domain="[('type','=','email')]"/>
90 <filter icon="terp-camera_test" name="type_comment" string="Comment" domain="[('type','=','comment')]"/>
91 <filter icon="terp-camera_test" name="type_notification" string="Notification" domain="[('type','=','notification')]"/>
92 <group expand="0" string="Extended Filters...">
93 <field name="author_id"/>
94 <field name="recipient_ids"/>
96 <field name="res_id"/>
98 <group expand="0" string="Group By...">
99 <filter string="Status" name="status" domain="[]" context="{'group_by':'state'}"/>
100 <filter string="Author" name="author" context="{'group_by':'author_id'}"/>
101 <filter string="Thread" name="thread" domain="[]" context="{'group_by':'message_id'}"/>
102 <filter string="Month" name="month" help="Creation Month" domain="[]" context="{'group_by':'date'}"/>
108 <record id="action_view_mail_mail" model="ir.actions.act_window">
109 <field name="name">Emails</field>
110 <field name="res_model">mail.mail</field>
111 <field name="view_type">form</field>
112 <field name="view_mode">tree,form</field>
113 <field name="context">{'search_default_outgoing': 1, 'search_default_type_email': 1}</field>
114 <field name="search_view_id" ref="view_mail_search"/>
117 <!-- Add menu entry in Settings/Email -->
118 <menuitem name="Emails" id="menu_mail_mail" parent="base.menu_email" action="action_view_mail_mail" />