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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
|
<?xml version="1.0"?>
<odoo>
<data>
<!-- mail.channel.partner -->
<record id="mail_channel_partner_view_tree" model="ir.ui.view">
<field name="name">mail.channel.partner.tree</field>
<field name="model">mail.channel.partner</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<tree string="Channels">
<field name="partner_id"/>
<field name="channel_id"/>
<field name="seen_message_id"/>
</tree>
</field>
</record>
<record id="mail_channel_partner_view_form" model="ir.ui.view">
<field name="name">mail.channel.partner.form</field>
<field name="model">mail.channel.partner</field>
<field name="arch" type="xml">
<form string="Channel">
<sheet>
<group>
<field name="partner_id"/>
<field name="channel_id"/>
<field name="seen_message_id"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="mail_channel_partner_action" model="ir.actions.act_window">
<field name="name">Channels/Partner</field>
<field name="res_model">mail.channel.partner</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Channels/Partner"
id="mail_channel_partner_menu"
parent="base.menu_email"
action="mail_channel_partner_action"
sequence="21"
groups="base.group_no_one"/>
<!-- mail.channel -->
<record id="mail_channel_view_kanban" model="ir.ui.view">
<field name="name">mail.channel.kanban</field>
<field name="model">mail.channel</field>
<field name="priority" eval="10"/>
<field name="arch" type="xml">
<kanban>
<field name="id"/>
<field name="description"/>
<field name="is_subscribed"/>
<field name="group_ids"/>
<field name="public"/>
<templates>
<t t-name="kanban-description">
<div class="oe_group_description" t-if="record.description.raw_value">
<field name="description"/>
</div>
</t>
<t t-name="kanban-box">
<div class="oe_module_vignette oe_kanban_global_click">
<img t-att-src="kanban_image('mail.channel', 'image_128', record.id.raw_value)" class="oe_module_icon" alt="Channel"/>
<div class="oe_module_desc">
<h4 class="o_kanban_record_title">#<field name="name"/></h4>
<p class="oe_module_name">
<field name="description"/>
</p>
<button type="object" attrs="{'invisible':['|', ('is_subscribed','=',True), ('group_ids', '!=', [])]}" class="btn btn-primary float-right" name="channel_join_and_get_info">Join</button>
<button type="object" attrs="{'invisible':['|', ('is_subscribed','=',False), ('group_ids', '!=', [])]}" class="btn btn-secondary float-right" name="action_unfollow">Leave</button>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="mail_channel_view_form" model="ir.ui.view">
<field name="name">mail.channel.form</field>
<field name="model">mail.channel</field>
<field name="priority" eval="10"/>
<field name="arch" type="xml">
<form string="Mail Channel Form">
<header>
<button name="send_guidelines" type="object" string="Send guidelines" confirm="You are going to send the guidelines to all the subscribers. Do you confirm the action?" attrs="{'invisible':['|',('moderation_guidelines','=',False), ('is_moderator', '=', False)]}"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<field name="is_moderator" invisible="1"/>
<button class="btn oe_stat_button" name="mail.mail_moderation_action" type="action" attrs="{'invisible':[('is_moderator', '=', False)]}" icon="fa-bars" context="{'search_default_channel_id': active_id}">
<field string="Moderation List" name="moderation_count" widget="statinfo"/>
</button>
</div>
<div class="oe_button_box" name="button_box"/>
<field name="image_128" widget="image" class="oe_avatar" options="{'size': [90, 90]}"/>
<div class="oe_title">
<div class="oe_edit_only">
<label for="name"/>
</div>
<h1>
#<field name="name" default_focus="1" placeholder="Name" readonly="0"/>
</h1>
</div>
<group class="o_label_nowrap">
<field name="active" invisible="1"/>
<field name="email_send"/>
<field name="moderation" attrs="{'invisible': [('email_send', '=', False)]}"/>
<field name="description" placeholder="Topics discussed in this group..."/>
</group>
<group name="group_alias" attrs="{'invisible': [('alias_domain', '=', False)]}">
<label for="alias_id" string=" " class="fa fa-envelope-o" style="min-width: 20px;" aria-label="Email" title="Email" role="img"/>
<div name="alias_def">
<field name="alias_id" class="oe_read_only oe_inline"
string="Email Alias" required="0"/>
<div class="oe_edit_only oe_inline" name="edit_alias" style="display: inline;" >
<field name="alias_name" class="oe_inline"/>@<field name="alias_domain" class="oe_inline" readonly="1"/>
</div>
</div>
<field name="alias_contact" class="oe_inline" invisible="1"/>
</group>
<notebook>
<page string="Privacy" name="privacy">
<group class="o_label_nowrap">
<field name="public" widget="radio" string="Who can follow the group's activities?"/>
<field name="group_public_id"
attrs="{'invisible': [('public','!=','groups')], 'required': [('public','=','groups')]}"
/>
<field name="group_ids" widget="many2many_tags"
string="Auto Subscribe Groups"/>
</group>
</page>
<page string="Members" name="members">
<field name="channel_last_seen_partner_ids" mode="tree" context="{'active_test': False}">
<tree string="Members" editable="bottom">
<field name="partner_id" required="1"/>
<field name="partner_email" readonly="1"/>
</tree>
</field>
</page>
<page string="Moderation" name="moderation" attrs="{'invisible': [('moderation', '=', False)]}">
<group>
<field name="moderator_ids" widget="many2many_tags"/>
<field name="moderation_notify"/>
<field name="moderation_notify_msg" attrs="{'invisible': [('moderation_notify', '=', False)]}"/>
<field name="moderation_guidelines"/>
<field name="moderation_guidelines_msg" attrs="{'invisible':[('moderation_guidelines', '=', False)]}"/>
</group>
</page>
<page string="Integrations" invisible="1" name="mail_channel_integrations"></page>
</notebook>
<div class="oe_chatter" groups="base.group_no_one">
<field name="message_follower_ids"/>
</div>
</sheet>
</form>
</field>
</record>
<record id="mail_channel_view_tree" model="ir.ui.view">
<field name="name">mail.channel.tree</field>
<field name="model">mail.channel</field>
<field name="priority" eval="10"/>
<field name="arch" type="xml">
<tree string="Groups">
<field name="name"/>
</tree>
</field>
</record>
<record id="mail_channel_view_search" model="ir.ui.view">
<field name="name">mail.channel.search</field>
<field name="model">mail.channel</field>
<field name="priority" eval="10"/>
<field name="arch" type="xml">
<search string="Search Groups">
<field name="name"/>
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
</search>
</field>
</record>
<record id="mail_channel_action_view" model="ir.actions.act_window">
<field name="name">Join a group</field>
<field name="res_model">mail.channel</field>
<field name="view_mode">kanban,tree,form</field>
<field name="search_view_id" ref="mail_channel_view_search"/>
</record>
<!-- settings !-->
<menuitem id="mail_channel_menu_settings" parent="base.menu_email" sequence="20"
name="Channels" action="mail_channel_action_view"
groups="base.group_no_one"/>
<record id="action_discuss" model="ir.actions.client">
<field name="name">Discuss</field>
<field name="tag">mail.widgets.discuss</field>
<field name="res_model">mail.channel</field>
<field name="params" eval=""{ 'default_active_id': 'mail.box_inbox' }""/>
</record>
<menuitem
id="mail.menu_root_discuss"
name="Discuss"
action="action_discuss"
web_icon="mail,static/description/icon.png"
groups="base.group_user"
sequence="1"
/>
<!--
This menuitem will be activated by integrations modules (like github, twitter, ...). It
is a hook to ease other modules to plug into mail.
-->
<record id="mail.mail_channel_integrations_menu" model="ir.ui.menu">
<field name="name">Integrations</field>
<field name="parent_id" ref="mail.menu_root_discuss"></field>
<field name="active" eval="False"></field>
</record>
</data>
</odoo>
|