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 <field name="mail_message_id" required="0" invisible="1"/>
11 <label for="subject" class="oe_edit_only"/>
12 <h2><field name="subject"/></h2>
14 by <field name="author_id" class="oe_inline" string="User"/> on <field name="date" class="oe_inline"/>
15 <button name="%(action_email_compose_message_wizard)d" string="Reply" type="action" icon="terp-mail-replied"
16 context="{'default_composition_mode':'reply', 'default_parent_id': mail_message_id}" states='received,sent,exception,cancel'/>
18 <notebook colspan="4">
19 <page string="Message Details">
22 <field name="email_from"/>
23 <field name="email_to"/>
24 <field name="email_cc"/>
25 <field name="reply_to"/>
28 <field name="partner_ids" widget="many2many_tags"/>
33 <field name="body_html"/>
37 <page string="Advanced" groups="base.group_no_one">
40 <field name="auto_delete"/>
42 <field name="state" colspan="2"/>
43 <field name="mail_server_id"/>
45 <field name="res_id"/>
48 <field name="message_id"/>
49 <field name="references"/>
53 <page string="Attachments">
54 <field name="attachment_ids"/>
62 <record model="ir.ui.view" id="view_mail_tree">
63 <field name="name">mail.mail.tree</field>
64 <field name="model">mail.mail</field>
65 <field name="arch" type="xml">
66 <tree string="Emails" colors="grey:state in ('sent', 'cancel');blue:state=='outgoing';red:state=='exception';black:state=='received'">
68 <field name="subject"/>
69 <field name="author_id" string="User"/>
70 <field name="message_id" invisible="1"/>
71 <field name="partner_ids" invisible="1"/>
72 <field name="model" invisible="1"/>
73 <field name="res_id" invisible="1"/>
74 <field name="email_from" invisible="1"/>
75 <field name="state" invisible="1"/>
76 <field name="type" invisible="1"/>
77 <button name="send" string="Send Now" type="object" icon="gtk-media-play" states='outgoing'/>
78 <button name="mark_outgoing" string="Retry" type="object" icon="gtk-redo" states='exception,cancel'/>
79 <button name="cancel" string="Cancel Email" type="object" icon="terp-gtk-stop" states='outgoing'/>
84 <record model="ir.ui.view" id="view_mail_search">
85 <field name="name">mail.mail.search</field>
86 <field name="model">mail.mail</field>
87 <field name="arch" type="xml">
88 <search string="Email Search">
89 <field name="email_from" filter_domain="['|' '|',('email_from','ilike',self), ('email_to','ilike',self), ('subject','ilike',self)]" string="Email"/>
91 <filter icon="terp-camera_test" name="received" string="Received" domain="[('state','=','received')]"/>
92 <filter icon="terp-call-start" name="outgoing" string="Outgoing" domain="[('state','=','outgoing')]"/>
93 <filter icon="terp-check" name="sent" string="Sent" domain="[('state','=','sent')]"/>
94 <filter icon="terp-gtk-stop" name="exception" string="Failed" domain="[('state','=','exception')]"/>
96 <filter icon="terp-camera_test" name="type_email" string="Email" domain="[('type','=','email')]"/>
97 <filter icon="terp-camera_test" name="type_comment" string="Comment" domain="[('type','=','comment')]"/>
98 <filter icon="terp-camera_test" name="type_notification" string="Notification" domain="[('type','=','notification')]"/>
99 <group expand="0" string="Extended Filters...">
100 <field name="author_id"/>
101 <field name="partner_ids"/>
102 <field name="model"/>
103 <field name="res_id"/>
105 <group expand="0" string="Group By...">
106 <filter string="Status" name="status" domain="[]" context="{'group_by':'state'}"/>
107 <filter string="Author" name="author" context="{'group_by':'author_id'}"/>
108 <filter string="Thread" name="thread" domain="[]" context="{'group_by':'message_id'}"/>
109 <filter string="Month" name="month" help="Creation Month" domain="[]" context="{'group_by':'date'}"/>
115 <record id="action_view_mail_mail" model="ir.actions.act_window">
116 <field name="name">Emails</field>
117 <field name="res_model">mail.mail</field>
118 <field name="view_type">form</field>
119 <field name="view_mode">tree,form</field>
120 <field name="context">{'search_default_outgoing': 1, 'search_default_type_email': 1}</field>
121 <field name="search_view_id" ref="view_mail_search"/>
124 <!-- Add menu entry in Settings/Email -->
125 <menuitem name="Emails" id="menu_mail_mail" parent="base.menu_email" action="action_view_mail_mail" />