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="{'mail.compose.message.mode':'reply', 'message_id':active_id}" states='received,sent,exception,cancel'/>
17 <notebook colspan="4">
18 <page string="Message Details">
21 <field name="email_from"/>
22 <field name="email_to"/>
23 <field name="email_cc"/>
24 <field name="reply_to"/>
27 <field name="partner_ids" widget="many2many_tags"/>
32 <field name="body" widget="text"/>
34 <page string="Body (Rich)">
35 <field name="body_html"/>
39 <page string="Advanced" groups="base.group_no_one">
42 <field name="auto_delete"/>
44 <field name="content_subtype"/>
45 <field name="state" colspan="2"/>
46 <field name="mail_server_id"/>
48 <field name="res_id"/>
51 <field name="message_id"/>
52 <field name="references"/>
56 <page string="Attachments">
57 <field name="attachment_ids"/>
65 <record model="ir.ui.view" id="view_mail_tree">
66 <field name="name">mail.message.tree</field>
67 <field name="model">mail.mail</field>
68 <field name="arch" type="xml">
69 <tree string="Emails" colors="grey:state in ('sent', 'cancel');blue:state=='outgoing';red:state=='exception';black:state=='received'">
71 <field name="subject"/>
72 <field name="author_id" string="User"/>
73 <field name="message_id" invisible="1"/>
74 <field name="partner_ids" invisible="1"/>
75 <field name="model" invisible="1"/>
76 <field name="res_id" invisible="1"/>
77 <field name="email_from" invisible="1"/>
78 <field name="state" invisible="1"/>
79 <field name="type" invisible="1"/>
80 <button name="send" string="Send Now" type="object" icon="gtk-media-play" states='outgoing'/>
81 <button name="mark_outgoing" string="Retry" type="object" icon="gtk-redo" states='exception,cancel'/>
82 <button name="cancel" string="Cancel" type="object" icon="terp-gtk-stop" states='outgoing'/>
87 <record model="ir.ui.view" id="view_mail_search">
88 <field name="name">mail.mail.search</field>
89 <field name="model">mail.mail</field>
90 <field name="arch" type="xml">
91 <search string="Email Search">
92 <field name="email_from" filter_domain="['|' '|',('email_from','ilike',self), ('email_to','ilike',self), ('subject','ilike',self)]" string="Email"/>
94 <filter icon="terp-camera_test" name="received" string="Received" domain="[('state','=','received')]"/>
95 <filter icon="terp-call-start" name="outgoing" string="Outgoing" domain="[('state','=','outgoing')]"/>
96 <filter icon="terp-check" name="sent" string="Sent" domain="[('state','=','sent')]"/>
97 <filter icon="terp-gtk-stop" name="exception" string="Failed" domain="[('state','=','exception')]"/>
99 <filter icon="terp-camera_test" name="type_email" string="Email" domain="[('type','=','email')]"/>
100 <filter icon="terp-camera_test" name="type_comment" string="Comment" domain="[('type','=','comment')]"/>
101 <filter icon="terp-camera_test" name="type_notification" string="Notification" domain="[('type','=','notification')]"/>
102 <group expand="0" string="Extended Filters...">
103 <field name="author_id"/>
104 <field name="partner_ids"/>
105 <field name="model"/>
106 <field name="res_id"/>
108 <group expand="0" string="Group By...">
109 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
110 <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
111 <filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
112 <filter string="Thread" icon="terp-mail-" domain="[]" context="{'group_by':'message_id'}"/>
113 <filter string="Month" help="Creation Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
119 <record id="action_view_mail_mail" model="ir.actions.act_window">
120 <field name="name">Messages</field>
121 <field name="res_model">mail.mail</field>
122 <field name="view_type">form</field>
123 <field name="view_mode">tree,form</field>
124 <field name="context">{'search_default_received': 1, 'search_default_type_email': 1}</field>
125 <field name="search_view_id" ref="view_mail_search"/>
128 <!-- Add menu entry in Settings/Email -->
129 <menuitem name="Mails" id="menu_mail_mail" parent="base.menu_email" action="action_view_mail_mail" />