forked from openlabs/poweremail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
poweremail_template_view.xml
263 lines (250 loc) · 14.5 KB
/
poweremail_template_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
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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<?xml version="1.0" encoding="UTF-8"?>
<!--
Document : poweremail_template_view.xml Created on : 22 July,
2009, 10:08 AM Author : Sharoon Thomas Description: View file
for templates
-->
<openerp>
<data>
<!-- Power Email Template PReview -->
<record model="ir.ui.view" id="poweremail_preview_form">
<field name="name">poweremail.preview.form</field>
<field name="model">poweremail.preview</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Power Email Preview">
<field name="rel_model" />
<newline />
<field name="rel_model_ref"
on_change="on_change_ref(rel_model_ref, context)" />
<newline />
<field name="to" />
<newline />
<field name="cc" />
<newline />
<field name="bcc" />
<newline />
<field name="subject" />
<newline />
<field name="body_text" />
<newline />
<field name="body_html" widget="text_html" />
<!--
IF YOU NEED RAW HTML EDITING THEN UNCOMMENT THE
FOLLOWING
-->
<!-- <field name="body_html"/>-->
<newline />
<field name="report" />
<group>
<button icon="gtk-ok" special="cancel"
string="OK" />
</group>
</form>
</field>
</record>
<record id="wizard_poweremail_preview" model="ir.actions.act_window">
<field name="name">Template Preview</field>
<field name="res_model">poweremail.preview</field>
<field name="src_model">poweremail.templates</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="auto_refresh" eval="1" />
<field name="target">new</field>
<field name="context">{'ids':active_id}</field>
</record>
<!--EMail client Form view -->
<record model="ir.ui.view" id="poweremail_template_form">
<field name="name">poweremail.templates.form</field>
<field name="model">poweremail.templates</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Power Email Templates">
<field name="name" />
<field name="object_name" required="1"
on_change="change_model(object_name)" />
<field name="model_int_name" invisible="1" />
<notebook colspan="4">
<page string="Mail Details">
<group col="4" colspan="2">
<field name="def_to" colspan="4"
required="1" />
<field name="def_cc" colspan="4" />
<field name="def_bcc" colspan="4" />
<field name="single_email"/>
</group>
<group col="2" colspan="2">
<field name="def_subject" colspan="4"
required="1" />
<field name="use_sign" colspan="4" />
<field name="lang" colspan="4" />
</group>
<separator colspan="3" string="Standard Body" />
<separator colspan="1"
string="Expression Builder" />
<notebook>
<page string="Body (Text)">
<field name="def_body_text"
colspan="4" nolabel="1" />
</page>
<!--
<page string="Body (Raw HTML)">
<field name="def_body_html"
colspan="4" nolabel="1" /> <label
string="Note: This is Raw HTML."
colspan="4" /> </page>
-->
<!--
We should support markdown instead
of expecting user to use html
-->
<!--
I dont advice using the html widget
because tinymce is interfering too
much with the html generated
Sunday,30 May 2010:Enabling HTML as
community votes for it
-->
<page string="Body (HTML)">
<field name="def_body_html"
colspan="4" nolabel="1" widget="text_html" />
<label
string="Note: HTML body can't be edited with GTK desktop client."
colspan="4" />
</page>
</notebook>
<group col="4">
<field name="template_language"
on_change="onchange_null_value(model_object_field,sub_model_object_field,null_value,template_language,context)" />
<notebook>
<page string="Insert Simple Field">
<field name="model_object_field"
domain="[('model_id','=',object_name),('ttype','!=','one2many'),('ttype','!=','many2many')]"
on_change="onchange_model_object_field(model_object_field, template_language,context)"
colspan="4" />
<field name="sub_object"
readonly="1" colspan="4" />
<field name="sub_model_object_field"
domain="[('model_id','=',sub_object),('ttype','!=','one2many'),('ttype','!=','many2many')]"
colspan="4"
attrs="{'readonly':[('sub_object','=',False)],'required':[('sub_object','!=',False)]}"
on_change="onchange_sub_model_object_field(model_object_field,sub_model_object_field,template_language,context)" />
<field name="null_value"
colspan="4"
on_change="onchange_null_value(model_object_field,sub_model_object_field,null_value,template_language,context)" />
<field name="copyvalue"
colspan="4" />
</page>
<page string="Insert Table">
<field
name="table_model_object_field"
domain="[('model_id','=',object_name),('ttype','in',['one2many','many2many'])]"
colspan="2"
on_change="onchange_table_model_object_field(table_model_object_field,template_language,context)" />
<field name="table_sub_object"
readonly="1" colspan="2" />
<field name="table_required_fields"
colspan="4" nolabel="1"
domain="[('model_id','=',table_sub_object),('ttype','!=','one2many'),('ttype','!=','many2many')]"
on_change="onchange_table_required_fields(table_model_object_field,table_required_fields,template_language,context)" />
<field name="table_html"
colspan="4" />
</page>
</notebook>
<button name="%(wizard_poweremail_preview)d"
string="Preview Template" type="action"
colspan="4" target="new" />
</group>
</page>
<page string="Security">
<separator colspan="4"
string="Allowed User Groups" />
<field name="allowed_groups" string="Allowed User Groups"
nolabel="1" />
</page>
<page string="Advanced">
<separator string="Automatic Email"
colspan="4" />
<field name="enforce_from_account"
attrs="{'required':[('auto_email','=',True)]}" />
<field name="auto_email" />
<field name="attached_wkf"
domain="[('osv','=',model_int_name)]"
attrs="{'required':[('auto_email','=',True)],'readonly':[('auto_email','=', False)]}" />
<field name="attached_activity"
domain="[('wkf_id', '=', attached_wkf)]"
attrs="{'required':[('auto_email','=',True)],'readonly':[('auto_email','=', False)]}" />
<field name="send_on_create" />
<field name="send_on_write" />
<field name="save_to_drafts" />
<field name="use_filter" />
<group string="Filter" colspan="4" attrs="{'invisible':[('use_filter','=',False)]}">
<group colspan="3" col="1">
<separator string="OpenObject Code Filter:"/>
<field name="filter" nolabel="1"/>
</group>
<group colspan="1" col="1">
<separator string="Available global variables:"/>
<label string="o - current object"/>
<label string="self - objects pointer"/>
<label string="uid - current user ID"/>
<label string="cr - database cursor"/>
<label string="context - current context"/>
</group>
</group>
<separator string="Email action and wizard"
colspan="4" />
<field name="server_action" readonly="1" />
<field name="ref_ir_act_window" />
<field name="ref_ir_value" />
<separator string="Attachments (Report to attach)"
colspan="4" />
<field name="file_name" colspan="2" />
<field name="report_template" colspan="2"
domain="[('model','=',model_int_name)]" />
<separator string="Log partner events"
colspan="4" />
<field name="partner_event" />
</page>
</notebook>
</form>
</field>
</record>
<record model="ir.ui.view" id="poweremail_template_tree">
<field name="name">poweremail.templates.tree</field>
<field name="model">poweremail.templates</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Power Email Templates">
<field name="name" select="1" />
<field name="object_name" required="1" select="1" />
<field name="def_to" colspan="4" select="2" />
<field name="def_cc" colspan="4" select="2" />
<field name="def_bcc" colspan="4" select="2" />
<field name="def_subject" colspan="4" select="2" />
<field name="use_sign" colspan="4" select="2" />
<field name="file_name" colspan="4" />
<field name="enforce_from_account" />
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_poweremail_template_tree_all">
<field name="name">Email Templates</field>
<field name="res_model">poweremail.templates</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="poweremail_template_tree" />
</record>
<record model="ir.actions.act_window" id="action_poweremail_template_form">
<field name="name">Email Templates</field>
<field name="res_model">poweremail.templates</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="poweremail_template_form" />
</record>
<menuitem name="Templates" id="menu_poweremail_templates" parent="menu_poweremail_administration_server" />
<menuitem name="Email Templates" id="menu_poweremail_templates_all"
parent="menu_poweremail_templates" action="action_poweremail_template_tree_all" />
</data>
</openerp>