-
Notifications
You must be signed in to change notification settings - Fork 28
/
distribution_list_view.xml
200 lines (183 loc) · 9.29 KB
/
distribution_list_view.xml
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
<?xml version='1.0' encoding='UTF-8' ?>
<openerp>
<data noupdate="0">
<!-- BACKEND -->
<!-- Include JS file for the custom view to select domain from filters -->
<template id="assets_backend" name="filter_selection" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/distribution_list/static/src/js/filter_selection.js"></script>
</xpath>
</template>
<!-- DISTRIBUTION LIST -->
<!-- SEARCH -->
<record id="distribution_list_search" model="ir.ui.view">
<field name="name">distribution.list.search</field>
<field name="model">distribution.list</field>
<field name="arch" type="xml">
<search string="Distribution Lists" version="7.0">
<field name="name"/>
<field name="dst_model_id"/>
<field name="note"/>
<group expand="0" string="Group By..." name="group_by">
<filter name="dst_model" string="Destination Model" domain="[]" context="{'group_by':'dst_model_id'}" />
</group>
</search>
</field>
</record>
<!-- TREE -->
<record id="distribution_list_tree" model="ir.ui.view">
<field name="name">distribution.list.tree</field>
<field name="model">distribution.list</field>
<field name="arch" type="xml">
<tree string="Distribution Lists" version="7.0">
<field name="name"/>
<field name="dst_model_id"/>
<button groups="base.group_user" name="get_action_from_domains" string="See Distribution List Result" type="object" icon="gtk-redo"/>
<button groups="base.group_user" name="mass_mailing" string="Mass Mailing" type="object" icon="terp-mail-message-new"/>
</tree>
</field>
</record>
<!-- FORM -->
<record id="distribution_list_form" model="ir.ui.view">
<field name="name">distribution.list.form</field>
<field name="model">distribution.list</field>
<field name="arch" type="xml">
<form string="Distribution List" version="7.0">
<header>
<button name="mass_mailing" type="object" string="Mass Mailing" groups="base.group_user"/>
</header>
<sheet>
<div class="oe_title" name="title">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" placeholder="Name"/>
</h1>
</div>
<group name="info">
<group>
<field name="dst_model_id"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group>
<field name="bridge_field"/>
</group>
</group>
<group name="filters">
<div name="to_include">
<separator string="Filters to Include"/>
<field name="to_include_distribution_list_line_ids">
<tree string="Filters to Include">
<field name="id" invisible="1"/>
<field name="name"/>
<field name="src_model_id"/>
<button groups="base.group_user" name="get_list_from_domain" string="See Filter Result" type="object" icon="gtk-redo"/>
</tree>
</field>
</div>
<div name="to_exclude">
<separator string="Filters to Exclude"/>
<field name="to_exclude_distribution_list_line_ids">
<tree string="Filters to Exclude">
<field name="name"/>
<field name="src_model_id"/>
<button groups="base.group_user" name="get_list_from_domain" string="See Filter Result" type="object" icon="gtk-redo"/>
</tree>
</field>
</div>
</group>
<notebook name="dl_notebook">
<page name="note" string="Notes">
<field name="note"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- DISTRIBUTION LIST LINE -->
<!-- SEARCH -->
<record id="distribution_list_line_search" model="ir.ui.view">
<field name="name">distribution.list.line.search</field>
<field name="model">distribution.list.line</field>
<field name="arch" type="xml">
<search string="Filters" version="7.0">
<field name="name"/>
<field name="src_model_id"/>
<group expand="0" string="Group By..." name="group_by">
<filter name="src_model" string="Model" domain="[]" context="{'group_by':'src_model_id'}" />
</group>
</search>
</field>
</record>
<!-- TREE -->
<record id="distribution_list_line_tree" model="ir.ui.view">
<field name="name">distribution.list.line.tree</field>
<field name="model">distribution.list.line</field>
<field name="arch" type="xml">
<tree string="Filters" version="7.0">
<field name="name"/>
<button groups="base.group_user" name="get_list_from_domain" string="See Filter Result" type="object" icon="gtk-redo"/>
</tree>
</field>
</record>
<!-- FORM -->
<record id="distribution_list_line_form" model="ir.ui.view">
<field name="name">distribution.list.line.form</field>
<field name="model">distribution.list.line</field>
<field name="arch" type="xml">
<form string="Filter" version="7.0">
<header>
<button groups="base.group_user" name="get_list_from_domain"
string="See Filter Result" type="object" class="oe_read_only"/>
</header>
<sheet>
<div class="oe_title" name="title">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" placeholder="Name"/>
</h1>
</div>
<group name="info">
<field name="src_model_id" on_change="onchange_src_model_id()"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<separator string="Expression"/>
<group name="expr">
<field name="domain" readonly="1"/>
<button class="oe_read_only" name="action_partner_selection" type="object" string="Define New Expression" groups="base.group_user"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- MENUS
Distribution List
* Distribution List
** Distribution Lists
** Filters
ACTIONS
* Distribution Lists
* Filters
-->
<record id="distribution_list_action" model="ir.actions.act_window">
<field name="name">Distribution Lists</field>
<field name="res_model">distribution.list</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<record id="distribution_list_line_action" model="ir.actions.act_window">
<field name="name">Filters</field>
<field name="res_model">distribution.list.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Distribution Lists" id="distribution_list_menu_root" groups="base.group_user"
sequence="30"/>
<menuitem name="Distribution Lists" id="distribution_list_menu" parent="distribution_list_menu_root"
sequence="10"/>
<menuitem id="distribution_list_submenu" parent="distribution_list_menu"
sequence="1" action="distribution_list_action"/>
<menuitem id="distribution_list_line" parent="distribution_list_menu"
sequence="2" action="distribution_list_line_action"/>
</data>
</openerp>