-
Notifications
You must be signed in to change notification settings - Fork 0
/
wage_increment_workflow.xml
69 lines (58 loc) · 2.79 KB
/
wage_increment_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>
<!-- Wage Increment Workflow Definition -->
<record id="wkf_wage_increment" model="workflow">
<field name="name">hr.contract.wage.increment.basic</field>
<field name="osv">hr.contract.wage.increment</field>
<field name="on_create">True</field>
</record>
<!-- Workflow Activities (Stages) -->
<record id="act_draft" model="workflow.activity">
<field name="wkf_id" ref="wkf_wage_increment"/>
<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_wage_increment"/>
<field name="name">confirm</field>
<field name="kind">function</field>
<field name="action">do_signal_confirm()</field>
</record>
<record id="act_approve" model="workflow.activity">
<field name="wkf_id" ref="wkf_wage_increment"/>
<field name="name">approve</field>
<field name="kind">function</field>
<field name="action">do_signal_approve()</field>
<field name="flow_stop">True</field>
</record>
<record id="act_decline" model="workflow.activity">
<field name="wkf_id" ref="wkf_wage_increment"/>
<field name="name">decline</field>
<field name="kind">function</field>
<field name="action">write({'state': 'decline'})</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="base.group_hr_manager"/>
</record>
<record id="confirm2approve" model="workflow.transition">
<field name="act_from" ref="act_confirm"/>
<field name="act_to" ref="act_approve"/>
<field name="signal">signal_approve</field>
<field name="group_id" ref="hr_security.group_hr_director"/>
</record>
<record id="confirm2decline" model="workflow.transition">
<field name="act_from" ref="act_confirm"/>
<field name="act_to" ref="act_decline"/>
<field name="signal">signal_decline</field>
<field name="group_id" ref="hr_security.group_hr_director"/>
</record>
</data>
</openerp>