forked from OCA/hr
-
Notifications
You must be signed in to change notification settings - Fork 7
/
hr_infraction_workflow.xml
69 lines (58 loc) · 2.77 KB
/
hr_infraction_workflow.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
<?xml version="1.0" encoding="utf-8" ?>
<openerp>
<data>
<!-- Workflow Definition -->
<record id="wkf_employee_infraction" model="workflow">
<field name="name">hr.infraction.basic</field>
<field name="osv">hr.infraction</field>
<field name="on_create">True</field>
</record>
<!-- Workflow Activities (Stages) -->
<record id="act_draft" model="workflow.activity">
<field name="wkf_id" ref="wkf_employee_infraction"/>
<field name="name">draft</field>
<field name="kind">function</field>
<field name="action">write({'state': 'draft'})</field>
<field name="flow_start">True</field>
</record>
<record id="act_confirm" model="workflow.activity">
<field name="wkf_id" ref="wkf_employee_infraction"/>
<field name="name">confirm</field>
<field name="kind">function</field>
<field name="action">write({'state': 'confirm'})</field>
</record>
<record id="act_action" model="workflow.activity">
<field name="wkf_id" ref="wkf_employee_infraction"/>
<field name="name">action</field>
<field name="kind">function</field>
<field name="action">write({'state': 'action'})</field>
<field name="flow_stop">True</field>
</record>
<record id="act_noaction" model="workflow.activity">
<field name="wkf_id" ref="wkf_employee_infraction"/>
<field name="name">noaction</field>
<field name="kind">function</field>
<field name="action">write({'state': 'noaction'})</field>
<field name="flow_stop">True</field>
</record>
<!-- Workflow Transitions -->
<record id="draft2confirm" model="workflow.transition">
<field name="act_from" ref="act_draft"/>
<field name="act_to" ref="act_confirm"/>
<field name="signal">signal_confirm</field>
<field name="group_id" ref="hr.group_hr_user"/>
</record>
<record id="confirm2action" model="workflow.transition">
<field name="act_from" ref="act_confirm"/>
<field name="act_to" ref="act_action"/>
<field name="signal">signal_action</field>
<field name="group_id" ref="hr.group_hr_manager"/>
</record>
<record id="confirm2noaction" model="workflow.transition">
<field name="act_from" ref="act_confirm"/>
<field name="act_to" ref="act_noaction"/>
<field name="signal">signal_noaction</field>
<field name="group_id" ref="hr.group_hr_manager"/>
</record>
</data>
</openerp>