~openerp-commiter/openobject-addons/extra-6.0

« back to all changes in this revision

Viewing changes to document_change/document_change_view.xml

  • Committer: Fabien Pinckaers
  • Date: 2010-01-29 01:04:21 UTC
  • Revision ID: fp@tinyerp.com-20100129010421-6wt4fmex3iecktp9
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<openerp>
 
3
<data>
 
4
 
 
5
    <menuitem 
 
6
        name="Process Changes" 
 
7
        icon="terp-stock" 
 
8
        id="menu_process_changes"/>
 
9
    <menuitem
 
10
        name="Process Changes" 
 
11
        id="menu_document_process_changes" 
 
12
        parent="menu_process_changes" 
 
13
        sequence="1"/>
 
14
    <menuitem
 
15
        id="menu_documents" 
 
16
        name="Documents"
 
17
        sequence="3"
 
18
        parent="menu_process_changes"/>
 
19
    <menuitem name="Change Control" id="menu_change_control" parent="menu_process_changes" sequence="5"/>
 
20
    <menuitem name="Reporting" id="menu_reporting" parent="menu_process_changes" sequence="10"/>
 
21
    <menuitem name="Configuration" id="menu_configuration" parent="menu_process_changes" sequence="15"/>
 
22
 
 
23
    <record model="ir.ui.view" id="view_document_structure_form">
 
24
        <field name="name">document.directory</field>
 
25
        <field name="model">document.directory</field>
 
26
        <field name="type">form</field>
 
27
        <field name="priority">1</field>
 
28
        <field name="arch" type="xml">
 
29
            <form string="Structure">
 
30
                <field name="parent_id" string="Work Station" select="1"/>
 
31
                <field name="name" string="Family" select="1"/>
 
32
            </form>
 
33
        </field>
 
34
    </record>
 
35
 
 
36
    <record model="ir.ui.view" id="view_document_structure_tree">
 
37
        <field name="name">document.directory</field>
 
38
        <field name="model">document.directory</field>
 
39
        <field name="type">tree</field>
 
40
        <field name="arch" type="xml">
 
41
            <tree string="Structure">
 
42
                <field name="parent_id" string="Work Station"/>
 
43
                <field name="name" string="Family"/>
 
44
            </tree>
 
45
        </field>
 
46
    </record>
 
47
 
 
48
    <record model="ir.actions.act_window" id="action_document_structure_form">
 
49
        <field name="type">ir.actions.act_window</field>
 
50
        <field name="res_model">document.directory</field>
 
51
        <field name="name">Directory Structure</field>
 
52
        <field name="view_type">tree</field>
 
53
        <field name="domain">[('parent_id','=',False)]</field>
 
54
        <field name="view_id" eval="document.view_document_directory_tree"/>
 
55
    </record>
 
56
    <menuitem name="Structure" id="menu_document_structure_config" parent="menu_configuration"/>
 
57
 
 
58
    <menuitem action="action_document_structure_form" id="menu_structure_form" parent="menu_document_structure_config"/>
 
59
 
 
60
    <act_window domain="[('structure_id', '=', active_id)]"
 
61
        id="act_structure_process_changes"
 
62
        name="Process Changes"
 
63
        res_model="document.change.process"
 
64
        src_model="document.directory"/>
 
65
 
 
66
    <!--
 
67
        Document Types
 
68
    -->
 
69
    <record model="ir.ui.view" id="view_document_type_form">
 
70
        <field name="name">document.change.type.form</field>
 
71
        <field name="model">document.change.type</field>
 
72
        <field name="type">form</field>
 
73
        <field name="arch" type="xml">
 
74
            <form string="Document Types">
 
75
                <field name="name" select="1"/>
 
76
                <field name="directory_id"/>
 
77
                <field name ="template_document_id"/>
 
78
                <field name ="filename" attrs="{'invisible':[('template_document_id','&lt;&gt;',False)]}"/>
 
79
                <separator string="Associated Phase Types" colspan="4"/>
 
80
                <field name="phase_type_ids" colspan="4" nolabel="1"/>
 
81
            </form>
 
82
        </field>
 
83
    </record>
 
84
 
 
85
    <record model="ir.ui.view" id="view_document_type_tree">
 
86
        <field name="name">document.change.type.tree</field>
 
87
        <field name="model">document.change.type</field>
 
88
        <field name="type">tree</field>
 
89
        <field name="arch" type="xml">
 
90
            <tree string="Document Types">
 
91
                <field name="name"/>
 
92
                <field name ="template_document_id"/>
 
93
            </tree>
 
94
        </field>
 
95
    </record>
 
96
 
 
97
    <record model="ir.actions.act_window" id="action_document_type_form">
 
98
        <field name="type">ir.actions.act_window</field>
 
99
        <field name="res_model">document.change.type</field>
 
100
        <field name="name">Document Types</field>
 
101
        <field name="view_type">form</field>
 
102
        <field name="view_mode">tree,form</field>
 
103
    </record>
 
104
    <menuitem
 
105
        name="Documents" 
 
106
        id="menu_document_type_config" 
 
107
        parent="menu_configuration"/>
 
108
 
 
109
    <menuitem
 
110
        action="action_document_type_form" 
 
111
        id="menu_document_type_form" 
 
112
        parent="menu_document_type_config"/>
 
113
 
 
114
    <record model="ir.ui.view" id="view_process_phase_type_form">
 
115
        <field name="name">document.change.process.phase.type.form</field>
 
116
        <field name="model">document.change.process.phase.type</field>
 
117
        <field name="type">form</field>
 
118
        <field name="arch" type="xml">
 
119
            <form string="Phase Types">
 
120
                <group colspan="4" col="6">
 
121
                    <field name="name" select="1" string="Phase Type"/>
 
122
                    <field name="sequence"/>
 
123
                    <field name="active"/>
 
124
                </group>
 
125
                <separator string="Associated Document Types" colspan="4"/>
 
126
                <field name="document_type_ids" colspan="4" nolabel="1"/>
 
127
            </form>
 
128
        </field>
 
129
    </record>
 
130
 
 
131
    <record model="ir.ui.view" id="view_process_phase_type_tree">
 
132
        <field name="name">document.change.process.phase.type.tree</field>
 
133
        <field name="model">document.change.process.phase.type</field>
 
134
        <field name="type">tree</field>
 
135
        <field name="arch" type="xml">
 
136
            <tree string="Phase Types">
 
137
                <field name="sequence" invisible="1"/>
 
138
                <field name="name" string="Phase Type"/>
 
139
                <field name="document_type_ids"/>
 
140
            </tree>
 
141
        </field>
 
142
    </record>
 
143
 
 
144
    <record model="ir.actions.act_window" id="action_process_phase_type_form">
 
145
        <field name="type">ir.actions.act_window</field>
 
146
        <field name="res_model">document.change.process.phase.type</field>
 
147
        <field name="name">Types of Phases</field>
 
148
        <field name="view_type">form</field>
 
149
        <field name="view_mode">tree,form</field>
 
150
    </record>
 
151
 
 
152
    <menuitem name="Process Changes" 
 
153
        id="menu_process_changes_config" 
 
154
        parent="menu_configuration"
 
155
        sequence="1"/>
 
156
    <menuitem 
 
157
        action="action_process_phase_type_form"
 
158
        id="menu_phase_type_form" 
 
159
        parent="menu_process_changes_config"
 
160
        sequence="4"/>
 
161
 
 
162
    <!-- Document Change Process Type -->
 
163
       <record model="ir.ui.view" id="view_change_process_type_form">
 
164
        <field name="name">document.change.process.type.form</field>
 
165
        <field name="model">document.change.process.type</field>
 
166
        <field name="type">form</field>
 
167
        <field name="arch" type="xml">
 
168
            <form string="Phase Types">
 
169
                    <field name="name" select="1" string="Phase Type"/>
 
170
            </form>
 
171
        </field>
 
172
    </record>
 
173
 
 
174
    <record model="ir.ui.view" id="view_change_processe_type_tree">
 
175
        <field name="name">document.change.process.type.tree</field>
 
176
        <field name="model">document.change.process.type</field>
 
177
        <field name="type">tree</field>
 
178
        <field name="arch" type="xml">
 
179
            <tree string="Phase Types">
 
180
                <field name="name" string="Phase Type"/>
 
181
            </tree>
 
182
        </field>
 
183
    </record>
 
184
 
 
185
    <record model="ir.actions.act_window" id="action_change_process_type_form">
 
186
        <field name="type">ir.actions.act_window</field>
 
187
        <field name="res_model">document.change.process.type</field>
 
188
        <field name="name">Process Type</field>
 
189
        <field name="view_type">form</field>
 
190
        <field name="view_mode">tree,form</field>
 
191
    </record>
 
192
 
 
193
    <menuitem action="action_change_process_type_form" id="menu_change_process_type_form" parent="menu_process_changes_config"/>
 
194
 
 
195
    <!--
 
196
        Model of Changes
 
197
    -->
 
198
    <record model="ir.ui.view" id="view_model_change_form">
 
199
        <field name="name">document.change.process.model.form</field>
 
200
        <field name="model">document.change.process.model</field>
 
201
        <field name="type">form</field>
 
202
        <field name="arch" type="xml">
 
203
            <form string="Model of Changes">
 
204
                <field name="name" select="1"/>
 
205
                <field name="sequence"/>
 
206
                <separator string="Phase Type" colspan="4"/>
 
207
                <field name="phase_type_ids" colspan="4" nolabel="1"/>
 
208
            </form>
 
209
        </field>
 
210
    </record>
 
211
 
 
212
    <record model="ir.ui.view" id="view_model_change_tree">
 
213
        <field name="name">document.change.process.model.tree</field>
 
214
        <field name="model">document.change.process.model</field>
 
215
        <field name="type">tree</field>
 
216
        <field name="arch" type="xml">
 
217
            <tree string="Model of Changes">
 
218
                <field name="sequence" invisible="1"/>
 
219
                <field name="name"/>
 
220
            </tree>
 
221
        </field>
 
222
    </record>
 
223
 
 
224
    <record model="ir.actions.act_window" id="action_model_change_form">
 
225
        <field name="type">ir.actions.act_window</field>
 
226
        <field name="res_model">document.change.process.model</field>
 
227
        <field name="name">Model of Process</field>
 
228
        <field name="view_type">form</field>
 
229
        <field name="view_mode">tree,form</field>
 
230
    </record>
 
231
    <menuitem action="action_model_change_form" id="menu_model_change_form" parent="menu_process_changes_config"/>
 
232
 
 
233
    <!--
 
234
        Documents
 
235
    -->
 
236
    <record model="ir.ui.view" id="view_document_form">
 
237
        <field name="name">ir.attachment.form</field>
 
238
        <field name="model">ir.attachment</field>
 
239
        <field name="priority" eval="-1"/>
 
240
        <field name="type">form</field>
 
241
        <field name="arch" type="xml">
 
242
            <form string="Documents">
 
243
                <field name="name" select="1"/>
 
244
                <field name="parent_id" select="1"/>
 
245
                <field name="datas" filename="datas_fname" string="Content"/>
 
246
                <field name="change_type_id" widget="selection"/>
 
247
                <field name="datas_fname"/>
 
248
                <field name="style"/>
 
249
                <notebook colspan="4">
 
250
                <page string="Information">
 
251
                    <group colspan="2" col="2">
 
252
                        <separator string="Creation" colspan="2"/>
 
253
                        <field name="create_uid" readonly="1"/>
 
254
                        <field name="create_date" readonly="1"/>
 
255
                    </group>
 
256
                    <group colspan="2" col="2">
 
257
                        <separator string="Latest Modification" colspan="2"/>
 
258
                        <field name="write_uid" readonly="1"/>
 
259
                        <field name="write_date" readonly="1"/>
 
260
                    </group>
 
261
                </page><page string="Change Request">
 
262
                    <separator string="Change Control" colspan="4"/>
 
263
                    <group col="11" colspan="2">
 
264
                        <field name="state" readonly="1"/>
 
265
                        <group attrs="{'invisible':[('state','in', ('in_production','draft'))]}">
 
266
                            <field name="target" filename="target_fname"/>
 
267
                        </group>
 
268
                        <button type="object" name="button_request" states="draft,in_production" string="Request Change" icon="gtk-media-play"/>
 
269
                        <button type="object" name="button_propose" states="change_request" string="Propose Change" icon="gtk-apply"/>
 
270
                        <button type="object" name="button_validate" states="change_propose" string="Update Production" icon="gtk-apply"/>
 
271
                        <button type="object" name="button_cancel" states="change_request,change_propose,to_update" string="Cancel"  icon="gtk-cancel"/>
 
272
                    </group>
 
273
                    <newline/>
 
274
                    <separator string="Change Note" colspan="4"/>
 
275
                    <field colspan="4" name="description" nolabel="1"/>
 
276
                </page><page string="Email Notifications">
 
277
                    <field name="email_notification_ids" colspan="4" mode="tree, form" readonly="1" widget="one2many_list" nolabel="1">
 
278
                        <tree string="Notifications">
 
279
                            <field name="email"/>
 
280
                            <field name="create_date"/>
 
281
                        </tree>
 
282
                        <form string="Notifications">
 
283
                            <field name="email"/>
 
284
                            <field name="create_date"/>
 
285
                            <field name="name" string="Subject" colspan="4"/>
 
286
                            <separator string="Description" colspan="4"/>
 
287
                            <field colspan="4" name="description" nolabel="1"/>
 
288
                        </form>
 
289
                    </field>
 
290
                </page>
 
291
                </notebook>
 
292
            </form>
 
293
        </field>
 
294
    </record>
 
295
    <record model="ir.ui.view" id="view_document_tree">
 
296
        <field name="name">ir.attachment.tree</field>
 
297
        <field name="model">ir.attachment</field>
 
298
        <field name="type">tree</field>
 
299
        <field name="priority" eval="-1"/>
 
300
        <field name="arch" type="xml">
 
301
            <tree string="Documents">
 
302
                <field name="name" string="Document"/>
 
303
                <field name="parent_id" string="Directory"/>
 
304
                <field name="change_type_id"/>
 
305
                <field name="style"/>
 
306
                <field name="state"/>
 
307
                <field name="change_process_id"/>
 
308
                <field name="user_id" string="Owner"/>
 
309
                <button type="object" name="button_request" states="draft,in_production" string="Request Change" icon="gtk-media-play"/>
 
310
            </tree>
 
311
        </field>
 
312
    </record>
 
313
    <record model="ir.ui.view" id="view_document_graph">
 
314
        <field name="name">ir.attachment.graph</field>
 
315
        <field name="model">ir.attachment</field>
 
316
        <field name="type">graph</field>
 
317
        <field name="arch" type="xml">
 
318
            <graph string="Documents by type" type="bar" orientation="vertical">
 
319
                <field name="change_type_id"/>
 
320
                <field name="name" operator="+"/>
 
321
            </graph>
 
322
        </field>
 
323
    </record>
 
324
    <record model="ir.ui.view" id="view_document_search">
 
325
        <field name="name">ir.attachment.search</field>
 
326
        <field name="model">ir.attachment</field>
 
327
        <field name="type">search</field>
 
328
        <field name="priority" eval="1"/>
 
329
        <field name="arch" type="xml">
 
330
            <search string="Documents">
 
331
                <group col="13" colspan="4">
 
332
                    <filter domain="[('user_id','=',uid)]" string="My Docs" icon="gtk-apply"/>
 
333
                    <separator orientation="vertical"/>
 
334
                    <filter domain="[('state','=','in_production')]" string="In Production" icon="gtk-apply"/>
 
335
                    <filter domain="[('state','=','change_request')]" string="Change Req." icon="gtk-apply"/>
 
336
                    <filter domain="[('state','=','change_propose')]" string="Change Proposed" icon="gtk-execute"/>
 
337
                    <filter domain="[('state','=','to_update')]" string="To Update" icon="gtk-execute"/>
 
338
                    <separator orientation="vertical"/>
 
339
                    <field name="change_type_id" widget="selection" select="1"/>
 
340
                    <field name="parent_id" select="1"/>
 
341
                    <field name="create_uid" select="1"/>
 
342
                </group>
 
343
                <group expand="1" string="Group By..." col="20" colspan="4">
 
344
                    <filter domain="[]" string="By Owner" icon="terp-hr" context="{'group_by':'create_uid'}" help="Documents by owner"/>
 
345
                    <filter domain="[]" string="By Directory" icon="terp-hr" context="{'group_by':'parent_id'}" help="Documents by directory"/>
 
346
                    <filter domain="[]" string="By Type" icon="terp-hr" context="{'group_by':'change_type_id'}" help="Documents by type"/>
 
347
                    <filter domain="[]" string="By State" icon="terp-hr" context="{'group_by':'state'}" help="Documents by type"/>
 
348
                </group>
 
349
            </search>
 
350
        </field>
 
351
    </record>
 
352
    <record model="ir.actions.act_window" id="action_document_form">
 
353
        <field name="type">ir.actions.act_window</field>
 
354
        <field name="res_model">ir.attachment</field>
 
355
        <field name="name">Search a Document</field>
 
356
        <field name="view_type">form</field>
 
357
        <field name="view_mode">tree,form,graph</field>
 
358
        <field name="search_view_id" ref="view_document_search"/>
 
359
    </record>
 
360
    <record id="action_document_tree_view" model="ir.actions.act_window.view">
 
361
        <field eval="1" name="sequence"/>
 
362
        <field name="view_mode">tree</field>
 
363
        <field name="view_id" ref="view_document_tree"/>
 
364
        <field name="act_window_id" ref="action_document_form"/>
 
365
    </record>
 
366
    <record id="action_document_form_view" model="ir.actions.act_window.view">
 
367
        <field eval="2" name="sequence"/>
 
368
        <field name="view_mode">form</field>
 
369
        <field name="view_id" ref="view_document_form"/>
 
370
        <field name="act_window_id" ref="action_document_form"/>
 
371
    </record>
 
372
    <record id="action_document_graph_view" model="ir.actions.act_window.view">
 
373
        <field eval="3" name="sequence"/>
 
374
        <field name="view_mode">graph</field>
 
375
        <field name="view_id" ref="view_document_graph"/>
 
376
        <field name="act_window_id" ref="action_document_form"/>
 
377
    </record>
 
378
    <menuitem
 
379
        action="action_document_form" 
 
380
        id="menu_documents_form" 
 
381
        parent="menu_documents"
 
382
        sequence="20"/>
 
383
    <menuitem
 
384
        name="Documents by Directories"
 
385
        action="document.action_document_directory_tree"
 
386
        sequence="1"
 
387
        id="menu_document_directories"
 
388
        parent="menu_documents"/>
 
389
 
 
390
 
 
391
    <record model="ir.actions.act_window" id="document.action_document_file_directory_form">
 
392
        <field name="search_view_id" ref="view_document_search"/>
 
393
    </record>
 
394
 
 
395
    <record model="ir.actions.act_window" id="action_document_without_type_form">
 
396
        <field name="type">ir.actions.act_window</field>
 
397
        <field name="res_model">ir.attachment</field>
 
398
        <field name="name">Documents Without Type</field>
 
399
        <field name="view_type">form</field>
 
400
        <field name="view_mode">tree,form</field>
 
401
        <field name="search_view_id" ref="view_document_search"/>
 
402
        <field name="domain">[('change_type_id','=',False)]</field>
 
403
    </record>
 
404
    <menuitem action="action_document_without_type_form" id="menu_documents_without_type_form" parent="menu_change_control"/>
 
405
 
 
406
    <record model="ir.actions.act_window" id="action_document_to_update_form">
 
407
        <field name="type">ir.actions.act_window</field>
 
408
        <field name="res_model">ir.attachment</field>
 
409
        <field name="name">Documents to Update</field>
 
410
        <field name="view_type">form</field>
 
411
        <field name="view_mode">tree,form</field>
 
412
        <field name="search_view_id" ref="view_document_search"/>
 
413
        <field name="domain">[('state','=','to_update')]</field>
 
414
        </record>
 
415
    <menuitem action="action_document_to_update_form" id="menu_documents_to_update_form" parent="menu_change_control"/>
 
416
 
 
417
    <!--
 
418
        Phases
 
419
    -->
 
420
    <record model="ir.ui.view" id="view_process_phase_form">
 
421
        <field name="name">document.change.process.phase.form</field>
 
422
        <field name="model">document.change.process.phase</field>
 
423
        <field name="type">form</field>
 
424
        <field name="arch" type="xml">
 
425
            <form string="Phases">
 
426
                <group colspan="4" col="6">
 
427
                    <field name="name" select="1"/>
 
428
                    <field name="process_id" string="Process Change"/>
 
429
                    <field name="sequence"/>
 
430
                    <newline/>
 
431
                    <field name="update_document" string="Update documents"/>
 
432
                    <field name="type" string="Type"/>
 
433
                    <field name="date_control" attrs="{'required':[('type','=','control_required')], 'invisible': [('type','!=','control_required')]}"/>
 
434
                    <field name="phase_type_id"/>
 
435
                    <field name="directory_id" readonly="1" colspan="4"/>
 
436
                </group>
 
437
                <separator colspan="4" string="Documents"/>
 
438
                <field name="phase_document_ids" colspan="4"  nolabel="1" context="{'default_parent_id': directory_id}"/>
 
439
                <newline/>
 
440
                <group col="5" colspan="4">
 
441
                    <field name="state"/>
 
442
                    <button name="button_start" states="draft" string="Start" icon="gtk-go-forward"/>
 
443
                    <button name="button_confirm" states="in_process" string="To Validate" icon="gtk-execute"/>
 
444
                    <button name="button_end" states="to_validate" string="Done" icon="gtk-jump-to"/>
 
445
                </group>
 
446
            </form>
 
447
        </field>
 
448
    </record>
 
449
    <record model="ir.ui.view" id="view_process_phase_search">
 
450
        <field name="name">document.change.process.phase.search</field>
 
451
        <field name="model">document.change.process.phase</field>
 
452
        <field name="type">search</field>
 
453
        <field name="arch" type="xml">
 
454
            <search string="Phases" col="20">
 
455
                <filter domain="[('state','=','draft')]" string="To Start" icon="gtk-execute"
 
456
                    help="To Start"/>
 
457
                <filter domain="[('state','=','in_process')]" string="In Progress" icon="gtk-execute"
 
458
                    help="In Progress"/>
 
459
                <filter domain="[('state','=','to_validate')]" string="To Validate" icon="gtk-execute"
 
460
                    help="To Validate"/>
 
461
                <separator orientation="vertical"/>
 
462
                <field name="process_id" select="1"/>
 
463
                <field name="name" select="1"/>
 
464
                <field name="phase_type_id" select="1"/>
 
465
                <field name="date_control" select="1"/>
 
466
                <newline/>
 
467
                <group string="Group By..." expand="1" colspan="10">
 
468
                    <filter domain="[]" string="By Process" icon="terp-hr" context="{'group_by':'process_id'}" help="Process Changes by owner"/>
 
469
                    <filter domain="[]" string="By Type" icon="terp-hr" context="{'group_by':'phase_type_id'}" help="Process Changes by owner"/>
 
470
                </group>
 
471
            </search>
 
472
        </field>
 
473
    </record>
 
474
 
 
475
        <record id="view_process_phase_calendar" model="ir.ui.view">
 
476
            <field name="name">document.change.process.phase.calendar</field>
 
477
            <field name="model">document.change.process.phase</field>
 
478
            <field name="type">calendar</field>
 
479
            <field eval="2" name="priority"/>
 
480
            <field name="arch" type="xml">
 
481
                <calendar color="state" date_start="date_control" string="Phases Deadlines">
 
482
                    <field name="name"/>
 
483
                    <field name="process_id"/>
 
484
                </calendar>
 
485
            </field>
 
486
        </record>
 
487
 
 
488
 
 
489
    <record model="ir.ui.view" id="view_process_phase_tree">
 
490
        <field name="name">document.change.process.phase.tree</field>
 
491
        <field name="model">document.change.process.phase</field>
 
492
        <field name="type">tree</field>
 
493
        <field name="arch" type="xml">
 
494
            <tree string="Phases">
 
495
                <field name="sequence" invisible="1"/>
 
496
                <field name="process_id"/>
 
497
                <field name="name"/>
 
498
                <field name="phase_type_id"/>
 
499
                <field name="date_control"/>
 
500
                <field name="state"/>
 
501
                <button name="button_start" states="draft" string="Start" icon="gtk-go-forward"/>
 
502
                <button name="button_confirm" states="in_process" string="To Validate" icon="gtk-execute"/>
 
503
                <button name="button_end" states="to_validate" string="Done" icon="gtk-jump-to"/>
 
504
            </tree>
 
505
        </field>
 
506
    </record>
 
507
 
 
508
    <record model="ir.actions.act_window" id="action_process_phase_form">
 
509
        <field name="type">ir.actions.act_window</field>
 
510
        <field name="res_model">document.change.process.phase</field>
 
511
        <field name="name">Phases</field>
 
512
        <field name="view_type">form</field>
 
513
        <field name="view_mode">tree,form,calendar</field>
 
514
        <field name="search_view_id" ref="view_process_phase_search"/>
 
515
    </record>
 
516
    <menuitem action="action_process_phase_form" id="menu_phases_form" parent="menu_document_process_changes"/>
 
517
 
 
518
    <record model="ir.actions.act_window" id="action_process_phase_form_validate">
 
519
        <field name="type">ir.actions.act_window</field>
 
520
        <field name="res_model">document.change.process.phase</field>
 
521
        <field name="name">Phases to Validate</field>
 
522
        <field name="view_type">form</field>
 
523
        <field name="view_mode">tree,form</field>
 
524
        <field name="domain">[('state','=','to_validate')]</field>
 
525
        <field name="search_view_id" ref="view_process_phase_search"/>
 
526
    </record>
 
527
    <menuitem action="action_process_phase_form_validate" id="menu_phases_to_validate_form" parent="menu_change_control"/>
 
528
 
 
529
    <act_window domain="[('process_phase_id', '=', active_id)]"
 
530
        id="act_documents_phases"
 
531
        name="Documents"
 
532
        res_model="ir.attachment"
 
533
        src_model="document.change.process.phase"/>
 
534
 
 
535
    <record model="ir.actions.act_window" id="act_documents_phases">
 
536
        <field name="search_view_id" ref="view_process_phase_search"/>
 
537
    </record>
 
538
 
 
539
 
 
540
    <!--
 
541
    Process Change
 
542
    -->
 
543
    <record model="ir.ui.view" id="view_process_form">
 
544
        <field name="name">document.change.process.form</field>
 
545
        <field name="model">document.change.process</field>
 
546
        <field name="type">form</field>
 
547
        <field name="arch" type="xml">
 
548
            <form string="Process Change">
 
549
                <group colspan="4" col="8">
 
550
                    <field name="description" colspan="4"/>
 
551
                    <field name="process_type_id" widget="selection"/>
 
552
                    <field name="name" readonly="1"/>
 
553
                    <newline/>
 
554
                    <!-- Big Hack For Demo Purpose Caterpillar -->
 
555
                    <field name="structure_id" colspan="4" domain="[('name','ilike','fam')]"/>
 
556
                    <field name="process_model_id" widget="selection"/>
 
557
                    <button name="generate_phases"
 
558
                        string="Generate Phases" type="object" 
 
559
                        icon="gtk-convert" colspan="2"/>
 
560
                </group>
 
561
 
 
562
                <notebook colspan="4">
 
563
                    <page string="Process Definition">
 
564
                        <group col="2" colspan="2">
 
565
                            <separator string="Responsibles" colspan="2"/>
 
566
                            <field name="user_id"/>
 
567
                        </group>
 
568
                        <group col="2" colspan="2">
 
569
                            <separator string="Dates" colspan="2"/>
 
570
                            <field name="create_date"/>
 
571
                            <field name="latest_modified_date"/>
 
572
                            <field name="date_expected"/>
 
573
                        </group>
 
574
                        <newline />
 
575
                         <separator colspan="4" string="Change Description"/>
 
576
                        <field name="change_description" colspan="4" nolabel="1"/>
 
577
                        <newline/>
 
578
                        <group col="6" colspan="4">
 
579
                            <field name="state"/>
 
580
                            <button name="button_start" states="draft,pending" string="Start" icon="gtk-go-forward"/>
 
581
                            <button name="button_confirm" states="in_progress" string="Validate" icon="gtk-execute"/>
 
582
                            <button name="button_pending" states="in_progress" string="Pending" icon="gtk-media-pause"/>
 
583
                            <button name="button_done" states="to_validate" string="Done" icon="gtk-jump-to"/>
 
584
                        </group>
 
585
                    </page>
 
586
                    <page string="Phases">
 
587
                        <field name="process_phase_ids" mode="tree,form" widget="one2many_list" nolabel="1">
 
588
                            <tree string="Process Phases" editable="True">
 
589
                                <field name="sequence" invisible="1"/>
 
590
                                <field name="name"/>
 
591
                                <field name="type"/>
 
592
                                <field name="date_control" attrs="{'required':[('type','=','control_required')], 'invisible': [('type','!=','control_required')]}"/>
 
593
                                <field name="phase_document_ids"/>
 
594
                                <field name="state"/>
 
595
                            </tree>
 
596
                            <form string="Process Phases">
 
597
                                <field name="name"/>
 
598
                                <field name="sequence"/>
 
599
                                <field name="type"/>
 
600
                                <field name="date_control" attrs="{'required':[('type','=','control_required')], 'invisible': [('type','!=','control_required')]}"/>
 
601
                                <field name="phase_document_ids" colspan="4"/>
 
602
                                <field name="state"/>
 
603
                            </form>
 
604
                        </field>
 
605
                    </page>
 
606
                </notebook>
 
607
            </form>
 
608
        </field>
 
609
    </record>
 
610
 
 
611
    <record model="ir.ui.view" id="view_process_tree">
 
612
        <field name="name">document.change.process.tree</field>
 
613
        <field name="model">document.change.process</field>
 
614
        <field name="type">tree</field>
 
615
        <field name="arch" type="xml">
 
616
            <tree string="Process Change">
 
617
                <field name="name"/>
 
618
                <field name="description"/>
 
619
                <field name="structure_id"/>
 
620
                <field name="user_id"/>
 
621
                <field name="current_phase_id"/>
 
622
                <field name="date_control"/>
 
623
                <field name="process_model_id"/>
 
624
                <field name="progress" widget="progressbar"/>
 
625
                <field name="process_document_ids" string="# Documents"/>
 
626
                <field name="state"/>
 
627
            </tree>
 
628
        </field>
 
629
    </record>
 
630
    <record model="ir.ui.view" id="view_process_graph">
 
631
        <field name="name">document.change.process.graph</field>
 
632
        <field name="model">document.change.process</field>
 
633
        <field name="type">graph</field>
 
634
        <field name="arch" type="xml">
 
635
            <graph string="Process changes by month" type="bar" orientation="vertical">
 
636
                <field name="create_date"/>
 
637
                <field name="process_document_ids" operator="+"/>
 
638
            </graph>
 
639
        </field>
 
640
    </record>
 
641
    <record model="ir.ui.view" id="view_process_serach">
 
642
        <field name="name">document.change.process.search</field>
 
643
        <field name="model">document.change.process</field>
 
644
        <field name="type">search</field>
 
645
        <field name="priority" eval="1"/>
 
646
        <field name="arch" type="xml">
 
647
            <search string="Process Changes">
 
648
                <group col="14" colspan="4">
 
649
                    <filter domain="[('user_id','=',uid)]" string="My Process" icon="gtk-execute" help="My Process Changes"/>
 
650
                    <separator orientation="vertical"/>
 
651
                    <filter domain="[('state','in',('in_progress','draft','to_validate'))]"
 
652
                        string="In Progress" icon="gtk-execute"
 
653
                        default="1"
 
654
                        help="Process changes having the next Phase to validate that is late"/>
 
655
                    <filter domain="[('state','=','to_validate')]"
 
656
                        string="To Validate"
 
657
                        icon="gtk-apply"
 
658
                        help="Process Changes to be validated"/>
 
659
                    <filter domain="[('state','=','pending')]"
 
660
                        string="Pending" icon="gtk-execute"
 
661
                        help="Process changes having the next Phase to validate that is late"/>
 
662
 
 
663
                    <separator orientation="vertical"/>
 
664
                    <field name="name" string="Process Change Title" select="1"/>
 
665
                    <field name="process_type_id" select="1"/>
 
666
                    <field name="structure_id" select="1"/>
 
667
                    <field name="user_id" string="Owner" select="1"/>
 
668
                </group>
 
669
                <group expand="1" string="Group By..." col="20" colspan="4">
 
670
                    <filter domain="[]" string="By Owner" icon="terp-hr" context="{'group_by':'user_id'}" help="Process Changes by owner"/>
 
671
                    <filter domain="[]" string="By Directory" icon="terp-hr" context="{'group_by':'structure_id'}" help="Process Changes by directory"/>
 
672
                    <filter domain="[]" string="By State" icon="terp-hr" context="{'group_by':'state'}" help="Process Changes by directory"/>
 
673
                </group>
 
674
            </search>
 
675
        </field>
 
676
    </record>
 
677
 
 
678
    <record model="ir.actions.act_window" id="action_process_form">
 
679
        <field name="type">ir.actions.act_window</field>
 
680
        <field name="res_model">document.change.process</field>
 
681
        <field name="name">Process Changes</field>
 
682
        <field name="view_type">form</field>
 
683
        <field name="view_mode">tree,form,graph</field>
 
684
        <field name="search_view_id" ref="view_process_serach"/>
 
685
    </record>
 
686
    <menuitem action="action_process_form" id="menu_process_changes_form" parent="menu_document_process_changes"/>
 
687
 
 
688
    <record model="ir.actions.act_window" id="action_process_change_form_validate">
 
689
        <field name="type">ir.actions.act_window</field>
 
690
        <field name="res_model">document.change.process</field>
 
691
        <field name="name">Process Changes to Validate</field>
 
692
        <field name="view_type">form</field>
 
693
        <field name="view_mode">tree,form</field>
 
694
        <field name="domain">[('state','=','to_validate')]</field>
 
695
    </record>
 
696
    <menuitem action="action_process_change_form_validate" id="menu_process_to_validate_form" parent="menu_change_control"/>
 
697
 
 
698
    <act_window domain="[('process_id', '=', active_id)]"
 
699
        id="act_phase_change_process"
 
700
        name="Phases"
 
701
        res_model="document.change.process.phase"
 
702
        src_model="document.change.process"/>
 
703
 
 
704
    <record model="ir.actions.act_window" id="act_phase_change_process">
 
705
        <field name="search_view_id" ref="view_process_phase_search"/>
 
706
    </record>
 
707
 
 
708
    <act_window domain="[('change_process_id', '=', active_id)]"
 
709
        id="act_documents_change_process"
 
710
        name="Documents"
 
711
        res_model="ir.attachment"
 
712
        src_model="document.change.process"/>
 
713
 
 
714
    <record model="ir.actions.act_window" id="act_documents_change_process">
 
715
        <field name="search_view_id" ref="view_document_search"/>
 
716
    </record>
 
717
 
 
718
        <!-- Dashboard -->
 
719
        <record model="ir.ui.view" id="view_document_change_report_graph">
 
720
        <field name="name">document.change.report.graph</field>
 
721
        <field name="model">document.change.report</field>
 
722
        <field name="type">graph</field>
 
723
        <field name="arch" type="xml">
 
724
            <graph string="Coverage Analysis" type="bar">
 
725
                <field name="change_type_id"/>
 
726
                <field name="amount_exist"/>
 
727
                <field name="amount_required"/>
 
728
            </graph>
 
729
        </field>
 
730
    </record>
 
731
    <record model="ir.actions.act_window" id="action_document_change_report">
 
732
        <field name="name">Coverage Analysis</field>
 
733
        <field name="type">ir.actions.act_window</field>
 
734
        <field name="res_model">document.change.report</field>
 
735
        <field name="view_type">form</field>
 
736
        <field name="view_mode">graph,tree</field>
 
737
        <field name="view_id" ref="view_document_change_report_graph"/>
 
738
    </record>
 
739
        
 
740
        <record id="board_document_change_form" model="ir.ui.view">
 
741
            <field name="name">board.document.change.form</field>
 
742
            <field name="model">board.board</field>
 
743
            <field name="type">form</field>
 
744
            <field name="arch" type="xml">
 
745
                <form string="Process Change Board">
 
746
                    <hpaned>
 
747
                        <child1>
 
748
                                <action colspan="4" height="220" name="%(action_document_to_update_form)d" string="Documents to Update" width="510"/>
 
749
                        </child1>
 
750
                        <child2>
 
751
                                <action colspan="4" height="220" name="%(action_document_change_report)d" string="Coverage Analysis" width="510"/>
 
752
                        </child2>
 
753
                    </hpaned>
 
754
                 </form>
 
755
            </field>
 
756
    </record>
 
757
        <record id="open_board_document_change" model="ir.actions.act_window">
 
758
            <field name="name">Process Change Dashboard</field>
 
759
            <field name="res_model">board.board</field>
 
760
            <field name="view_type">form</field>
 
761
            <field name="view_mode">form</field>
 
762
            <field name="usage">menu</field>
 
763
            <field name="view_id" ref="board_document_change_form"/>
 
764
    </record>
 
765
        <menuitem icon="terp-graph" id="base.dashboard" name="Dashboards" sequence="2" parent="base.reporting_menu"/>
 
766
    <menuitem
 
767
        id="menu_document_change_dashboard"
 
768
        name="Process Change"
 
769
        parent="base.dashboard"/>
 
770
    <menuitem
 
771
        action="open_board_document_change"
 
772
        icon="terp-graph"
 
773
        id="menu_board_document_change"
 
774
        parent="menu_document_change_dashboard"
 
775
        sequence="1"/>
 
776
 
 
777
    <record model="ir.actions.act_window" id="action_process_phase_cal">
 
778
        <field name="type">ir.actions.act_window</field>
 
779
        <field name="res_model">document.change.process.phase</field>
 
780
        <field name="name">Calendar of Phases</field>
 
781
        <field name="view_type">form</field>
 
782
        <field name="view_mode">calendar,tree,form</field>
 
783
        <field name="search_view_id" ref="view_process_phase_search"/>
 
784
    </record>
 
785
    <menuitem action="action_process_phase_cal" id="menu_phases_cal" parent="menu_change_control"/>
 
786
 
 
787
 
 
788
</data>
 
789
</openerp>