4
# OpenERP - Spanish Fiscal Year Closing
5
# Copyright (C) 2009 Pexego Sistemas Informáticos. All Rights Reserved
8
# This program is free software: you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published by
10
# the Free Software Foundation, either version 3 of the License, or
11
# (at your option) any later version.
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
18
# You should have received a copy of the GNU General Public License
19
# along with this program. If not, see <http://www.gnu.org/licenses/>.
23
Authors: Borja López Soilán (Pexego) - borjals@pexego.es
28
<!-- Wizard tree view -->
29
<record model="ir.ui.view" id="view_fyc_tree">
30
<field name="name">l10n_es_cierre_ejercicio.fyc.tree</field>
31
<field name="model">l10n_es_cierre_ejercicio.fyc</field>
32
<field name="type">tree</field>
33
<field name="arch" type="xml">
34
<tree string="Spanish Fiscal Year Closings" colors="red:state=='new';blue:state=='draft';green:state=='in_progress'">
35
<field name="company_id" select="1"/>
36
<field name="name" select="2"/>
37
<field name="closing_fiscalyear_id" select="1"/>
38
<field name="opening_fiscalyear_id" select="1"/>
44
<!-- Wizard form view -->
45
<record model="ir.ui.view" id="view_fyc_form">
46
<field name="name">l10n_es_cierre_ejercicio.fyc.form</field>
47
<field name="model">l10n_es_cierre_ejercicio.fyc</field>
48
<field name="type">form</field>
49
<field name="arch" type="xml">
50
<form string="Spanish Fiscal Year Closing">
51
<group attrs="{'invisible':[('state','!=','new')]}" colspan="4">
52
<label string="Please, select the company, fiscal year to close and fiscal year to open." colspan="4"/>
55
<field name="company_id" required="1" select="1" attrs="{'readonly':[('state','!=','new')]}"/>
56
<field name="name" select="2" attrs="{'readonly':[('state','!=','new')]}"/>
58
<group string="Fiscal Years" colspan="4">
59
<field name="closing_fiscalyear_id" attrs="{'readonly':[('state','!=','new')]}"/>
60
<field name="opening_fiscalyear_id" attrs="{'readonly':[('state','!=','new')]}"/>
62
<group attrs="{'invisible':[('state','!=','new')]}" colspan="4">
63
<button name="draft" string="Continue" states="new" icon="gtk-apply" colspan="4"/>
65
<group attrs="{'invisible':[('state','=','new')]}" colspan="4">
66
<notebook colspan="4">
67
<page string="General">
68
<group string="Operations" colspan="4">
70
<separator string="Operation to perform" colspan="2"/>
71
<separator string="Move created by the operation" colspan="2"/>
72
<field name="create_loss_and_profit" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
73
<field name="loss_and_profit_move_id"/>
74
<field name="create_net_loss_and_profit" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
75
<field name="net_loss_and_profit_move_id"/>
76
<field name="create_closing" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
77
<field name="closing_move_id"/>
78
<field name="create_opening" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
79
<field name="opening_move_id"/>
81
<separator string="Checks"/>
83
<field name="check_invalid_period_moves" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
84
<field name="check_draft_moves" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
85
<field name="check_unbalanced_moves" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
88
<group colspan="4" col="10">
89
<field name="state" select="2" readonly="1"/>
90
<button name="%(wiz_l10n_es_cierre_ejercicio_run)d"
92
string="Perform the operations"
94
states="draft,in_progress"/>
95
<button name="confirm" string="Confirm" states="in_progress" icon="gtk-apply"/>
96
<button name="%(wiz_l10n_es_cierre_ejercicio_cancel)d"
100
states="in_progress,done"/>
101
<button name="action_recover" string="Draft" type="object" states="canceled" icon="gtk-undo"/>
104
<page string="Configuration" attrs="{'invisible':[('state','=','new')]}">
105
<notebook colspan="4">
106
<page string="Loss and Profit">
107
<field name="lp_description" colspan="4" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
108
<field name="lp_journal_id" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
109
<field name="lp_period_id" domain="[('special','=',True)]" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
110
<field name="lp_date" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
111
<field name="lp_account_mapping_ids" colspan="4" nolabel="1" attrs="{'readonly':[('state','in',('done','cancel'))]}">
112
<tree string="Account mappings" editable="top">
113
<field name="source_account_id"/>
114
<field name="dest_account_id" required="1"/>
116
<form string="Account mapping">
117
<field name="source_account_id"/>
118
<field name="dest_account_id" required="1"/>
123
<page string="Net Loss and Profit">
124
<field name="nlp_description" colspan="4" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
125
<field name="nlp_journal_id" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
126
<field name="nlp_period_id" domain="[('special','=',True)]" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
127
<field name="nlp_date" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
128
<field name="nlp_account_mapping_ids" colspan="4" nolabel="1" attrs="{'readonly':[('state','in',('done','cancel'))]}">
129
<tree string="Account mappings" editable="top">
130
<field name="source_account_id"/>
131
<field name="dest_account_id" required="1"/>
133
<form string="Account mapping">
134
<field name="source_account_id"/>
135
<field name="dest_account_id" required="1"/>
140
<page string="Closing">
141
<field name="c_description" colspan="4" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
142
<field name="c_journal_id" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
143
<field name="c_period_id" domain="[('special','=',True)]" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
144
<field name="c_date" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
145
<field name="c_account_mapping_ids" colspan="4" nolabel="1" attrs="{'readonly':[('state','in',('done','cancel'))]}">
146
<tree string="Accounts to close" editable="top">
147
<field name="source_account_id"/>
149
<form string="Account to close">
150
<field name="source_account_id"/>
155
<page string="Opening">
156
<field name="o_description" colspan="4" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
157
<field name="o_journal_id" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
158
<field name="o_period_id" domain="[('special','=',True)]" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
159
<field name="o_date" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
169
<!-- Menus and windows -->
171
<record model="ir.actions.act_window" id="action_view_fyc_form">
172
<field name="name">Close Fiscal Year</field>
173
<field name="type">ir.actions.act_window</field>
174
<field name="res_model">l10n_es_cierre_ejercicio.fyc</field>
175
<field name="view_type">form</field>
176
<field name="view_mode">form,tree</field>
177
<field name="view_id" ref="view_fyc_form"/>
180
<menuitem id="menu_fyc_new"
181
parent="account.menu_account_end_year_treatments"
182
name="Close Fiscal Year"
183
action="action_view_fyc_form"
186
<record model="ir.actions.act_window" id="action_view_fyc_tree">
187
<field name="name">Fiscal Years Closings</field>
188
<field name="type">ir.actions.act_window</field>
189
<field name="res_model">l10n_es_cierre_ejercicio.fyc</field>
190
<field name="view_type">form</field>
191
<field name="view_mode">tree,form</field>
192
<field name="view_id" ref="view_fyc_tree"/>
195
<menuitem id="menu_fyc_list"
196
parent="account.menu_account_end_year_treatments"
197
name="Fiscal Years Closings"
198
action="action_view_fyc_tree"