~agilebg/openobject-italia/imp_save_fiscalcode_data

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
<?xml version="1.0" encoding="utf-8"?>
<!--
#
#    OpenERP - Fiscal Year Closing
#    Copyright (C) 2009 Pexego Sistemas Informáticos. All Rights Reserved
#    $Id$
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
-->
<!--
Fiscal Year Closing wizard workflow.

Author: Borja López Soilán (Pexego) - borja@kami.es
-->
<openerp>
    <data>
        <!-- *** Nodes ***************************************************** -->

        <record model="workflow" id="wkf_fyc">
            <field name="name">Fiscal Year Closing workflow</field>
            <field name="osv">account_fiscal_year_closing.fyc</field>
            <field name="on_create">True</field>
        </record>


        <record model="workflow.activity" id="act_new">
            <field name="wkf_id" ref="wkf_fyc"/>
            <field name="flow_start">True</field>
            <field name="name">new</field>
        </record>

        <record model="workflow.activity" id="act_draft">
            <field name="wkf_id" ref="wkf_fyc"/>
            <field name="name">draft</field>
            <field name="action">action_draft()</field>
            <field name="kind">function</field>
        </record>

        <record model="workflow.activity" id="act_progress">
            <field name="wkf_id" ref="wkf_fyc"/>
            <field name="name">in_progress</field>
            <field name="action">action_run()</field>
            <field name="kind">function</field>
        </record>

        <record model="workflow.activity" id="act_confirm">
            <field name="wkf_id" ref="wkf_fyc"/>
            <field name="name">confirmed</field>
            <field name="action">action_confirm()</field>
            <field name="kind">function</field>
        </record>

        <record model="workflow.activity" id="act_cancel">
            <field name="wkf_id" ref="wkf_fyc"/>
            <field name="name">canceled</field>
            <field name="flow_stop">True</field>
            <field name="action">action_cancel()</field>
            <field name="kind">function</field>
        </record>


        <!-- *** Transitions *********************************************** -->

        <record model="workflow.transition" id="trans_new_draft">
            <field name="act_from" ref="act_new"/>
            <field name="act_to" ref="act_draft"/>
            <field name="signal">draft</field>
        </record>

        <record model="workflow.transition" id="trans_draft_progress">
            <field name="act_from" ref="act_draft"/>
            <field name="act_to" ref="act_progress"/>
            <field name="signal">run</field>
        </record>

        <record model="workflow.transition" id="trans_progress_progress">
            <field name="act_from" ref="act_progress"/>
            <field name="act_to" ref="act_progress"/>
            <field name="signal">run</field>
        </record>

        <record model="workflow.transition" id="trans_progress_confirm">
            <field name="act_from" ref="act_progress"/>
            <field name="act_to" ref="act_confirm"/>
            <field name="signal">confirm</field>
        </record>

        <record model="workflow.transition" id="trans_progress_cancel">
            <field name="act_from" ref="act_progress"/>
            <field name="act_to" ref="act_cancel"/>
            <field name="signal">cancel</field>
        </record>

        <record model="workflow.transition" id="trans_confirm_cancel">
            <field name="act_from" ref="act_confirm"/>
            <field name="act_to" ref="act_cancel"/>
            <field name="signal">cancel</field>
        </record>

    </data>
</openerp>