forked from OCA/hr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wage_adjustment_run_workflow.xml
69 lines (58 loc) · 2.86 KB
/
wage_adjustment_run_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 Adjustment Run Workflow Definition -->
<record id="wkf_wage_adjustment_run" model="workflow">
<field name="name">hr.contract.wage.increment.run.basic</field>
<field name="osv">hr.contract.wage.increment.run</field>
<field name="on_create">True</field>
</record>
<!-- Workflow Activities (Stages) -->
<record id="act_run_draft" model="workflow.activity">
<field name="wkf_id" ref="wkf_wage_adjustment_run"/>
<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_run_confirm" model="workflow.activity">
<field name="wkf_id" ref="wkf_wage_adjustment_run"/>
<field name="name">confirm</field>
<field name="kind">function</field>
<field name="action">state_confirm()</field>
</record>
<record id="act_run_approve" model="workflow.activity">
<field name="wkf_id" ref="wkf_wage_adjustment_run"/>
<field name="name">approve</field>
<field name="kind">function</field>
<field name="action">state_approve()</field>
<field name="flow_stop">True</field>
</record>
<record id="act_run_decline" model="workflow.activity">
<field name="wkf_id" ref="wkf_wage_adjustment_run"/>
<field name="name">decline</field>
<field name="kind">function</field>
<field name="action">state_decline()</field>
<field name="flow_stop">True</field>
</record>
<!-- Workflow Transitions -->
<record id="run_draft2confirm" model="workflow.transition">
<field name="act_from" ref="act_run_draft"/>
<field name="act_to" ref="act_run_confirm"/>
<field name="signal">signal_confirm</field>
<field name="group_id" ref="base.group_hr_manager"/>
</record>
<record id="run_confirm2approve" model="workflow.transition">
<field name="act_from" ref="act_run_confirm"/>
<field name="act_to" ref="act_run_approve"/>
<field name="signal">signal_approve</field>
<field name="group_id" ref="hr_security.group_hr_director"/>
</record>
<record id="run_confirm2decline" model="workflow.transition">
<field name="act_from" ref="act_run_confirm"/>
<field name="act_to" ref="act_run_decline"/>
<field name="signal">signal_decline</field>
<field name="group_id" ref="hr_security.group_hr_director"/>
</record>
</data>
</openerp>