File: mail_mail_views.xml

package info (click to toggle)
odoo 18.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 878,716 kB
  • sloc: javascript: 927,937; python: 685,670; xml: 388,524; sh: 1,033; sql: 415; makefile: 26
file content (170 lines) | stat: -rw-r--r-- 10,599 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?xml version="1.0"?>
<odoo>
    <data>
        <record model="ir.ui.view" id="view_mail_form">
            <field name="name">mail.mail.form</field>
            <field name="model">mail.mail</field>
            <field name="arch" type="xml">
                <form string="Email message" duplicate="0">
                    <header>
                        <field name="message_type" invisible="1"/>
                        <button name="send" string="Send Now" type="object" class="oe_highlight" invisible="state != 'outgoing' or message_type == 'user_notification'"/>
                        <button name="mark_outgoing" string="Retry" type="object" invisible="state not in ('exception', 'cancel')"/>
                        <button name="cancel" string="Cancel" type="object" invisible="state != 'outgoing'"/>
                        <field name="state" widget="statusbar" statusbar_visible="outgoing,sent,received,exception,cancel"/>
                    </header>
                    <sheet>
                        <field name="model" invisible="1"/>
                        <field name="res_id" invisible="1"/>
                        <div class="oe_button_box" name="button_box">
                            <button name="action_open_document"
                                    type="object" class="oe_link" icon="fa-file-text-o"
                                    invisible="not model or res_id == 0">
                                    <div class="o_field_widget o_stat_info">
                                        <span class="o_stat_text">Open Document</span>
                                    </div>
                            </button>
                        </div>
                        <field name="mail_message_id_int" required="0" invisible="1"/>
                        <div class="oe_title">
                            <label for="subject" class="oe_edit_only"/>
                            <h2><field name="subject"/></h2>
                        </div>
                        <div style="vertical-align: top;">
                            by <field name="author_id" class="oe_inline" string="User"/> on <field name="date" readonly="1" class="oe_inline"/>
                            <button name="%(action_email_compose_message_wizard)d" string="Reply" type="action" icon="fa-reply text-warning"
                                context="{'default_composition_mode':'comment', 'default_parent_id': mail_message_id_int}" invisible="state not in ('received', 'sent', 'exception', 'cancel')"/>
                        </div>
                        <group>
                            <field name="email_from"/>
                            <field name="email_to"/>
                            <field name="recipient_ids" widget="many2many_tags"
                                domain="[('active', '=', True)]"/>
                            <field name="email_cc"/>
                            <field name="reply_to"/>
                            <field name="scheduled_date" placeholder="YYYY-MM-DD HH:MM:SS"/>
                        </group>
                        <notebook>
                            <page string="Body" name="body">
                            <field name="body_html" widget="html"
                                   options="{'sandboxedPreview': true}"
                                   readonly="state not in ['outgoing', 'exception']"/>
                            </page>
                            <page string="Advanced" name="advanced" groups="base.group_no_one">
                                <group>
                                    <group string="Status">
                                        <field name="auto_delete"
                                            invisible="state != 'outgoing' and state != 'exception'"/>
                                        <field name="is_notification"/>
                                        <field name="message_type"/>
                                        <field name="mail_server_id"/>
                                        <field name="model"/>
                                        <field name="res_id"/>
                                    </group>
                                    <group string="Headers">
                                        <field name="message_id"/>
                                        <field name="references"/>
                                        <field name="fetchmail_server_id"/>
                                        <field name="headers"/>
                                    </group>
                                </group>
                            </page>
                            <page string="Attachments" name="attachments">
                                <div class="alert alert-warning" role="alert"
                                    invisible="restricted_attachment_count == 0">
                                    You do not have access to <field name="restricted_attachment_count"/>
                                    attachment(s) of this email.
                                </div>
                                <field name="unrestricted_attachment_ids"
                                    domain="[('res_field','=', False)]"/>
                            </page>
                            <page string="Failure Reason" name="failure_reason" invisible="state != 'exception'">
                                <field name="failure_reason"/>
                            </page>
                        </notebook>
                    </sheet>
                </form>
            </field>
        </record>

        <record model="ir.ui.view" id="view_mail_tree">
            <field name="name">mail.mail.list</field>
            <field name="model">mail.mail</field>
            <field name="arch" type="xml">
                <list string="Emails">
                    <header>
                        <button name="action_retry" string="Retry" type="object"/>
                    </header>
                    <field name="date"/>
                    <field name="subject"/>
                    <field name="author_id" string="User"/>
                    <field name="message_id" column_invisible="True"/>
                    <field name="recipient_ids" column_invisible="True"/>
                    <field name="model" column_invisible="True"/>
                    <field name="res_id" column_invisible="True"/>
                    <field name="email_from" column_invisible="True"/>
                    <field name="message_type" column_invisible="True"/>
                    <field name="state" widget="badge" decoration-muted="state in ('sent', 'cancel')"
                        decoration-info="state=='outgoing'" decoration-danger="state=='exception'"/>
                    <button name="send" string="Send Now" type="object" icon="fa-paper-plane" invisible="state != 'outgoing' or message_type == 'user_notification'"/>
                    <button name="mark_outgoing" string="Retry" type="object" icon="fa-repeat" invisible="state not in ('exception', 'cancel')"/>
                    <button name="cancel" string="Cancel Email" type="object" icon="fa-times-circle" invisible="state != 'outgoing'"/>
                </list>
            </field>
        </record>

        <record model="ir.ui.view" id="view_mail_search">
            <field name="name">mail.mail.search</field>
            <field name="model">mail.mail</field>
            <field name="arch" type="xml">
                <search string="Email Search">
                    <field name="email_from" filter_domain="['|', '|',('email_from','ilike',self), ('email_to','ilike',self), ('subject','ilike',self)]" string="Email"/>
                    <field name="date"/>
                    <filter name="received" string="Received" domain="[('state','=','received')]"/>
                    <filter name="outgoing" string="Outgoing" domain="[('state','=','outgoing')]"/>
                    <filter name="sent" string="Sent" domain="[('state','=','sent')]"/>
                    <filter name="exception" string="Failed" domain="[('state','=','exception')]"/>
                    <separator/>
                    <filter name="filter_type_email_outgoing" string="Outgoing Email"
                            domain="[('message_type','=','email_outgoing')]"/>
                    <filter name="filter_type_email" string="Incoming Email"
                            domain="[('message_type','=','email')]"/>
                    <filter name="filter_type_comment" string="Comment"
                            domain="[('message_type','=','comment')]"/>
                    <filter name="filter_type_notification" string="Notification"
                            domain="[('message_type','=','notification')]"/>
                    <group expand="0" string="Extended Filters...">
                        <field name="author_id"/>
                        <field name="recipient_ids"/>
                        <field name="model"/>
                        <field name="res_id"/>
                    </group>
                    <group expand="0" string="Group By">
                        <filter string="Status" name="status" domain="[]" context="{'group_by':'state'}"/>
                        <filter string="Author" name="author" context="{'group_by':'author_id'}"/>
                        <filter string="Thread" name="thread" domain="[]" context="{'group_by':'message_id'}"/>
                        <filter string="Date" name="month" help="Creation Date" domain="[]" context="{'group_by':'date'}"/>
                    </group>
                </search>
            </field>
        </record>

        <record id="action_view_mail_mail" model="ir.actions.act_window">
            <field name="name">Emails</field>
            <field name="res_model">mail.mail</field>
            <field name="view_mode">list,form</field>
            <field name="context">{}</field>
            <field name="search_view_id" ref="view_mail_search"/>
        </record>

        <record id="act_server_history" model="ir.actions.act_window">
            <field name="name">Messages</field>
            <field name="res_model">mail.mail</field>
            <field name="domain">[('email_from', '!=', False), ('fetchmail_server_id', '=', active_id)]</field>
            <field name="context">{'search_default_server_id': active_id, 'default_fetchmail_server_id': active_id}</field>
            <field name="binding_model_id" ref="model_fetchmail_server"/>
            <field name="binding_view_types">form</field>
        </record>

    </data>
</odoo>