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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
<odoo>
<data>
<!-- Fiscal Year -->
<record id="view_account_fiscalyear_periods_form" model="ir.ui.view">
<field name="name">account.fiscalyear.periods.form</field>
<field name="model">account.fiscalyear.periods</field>
<field name="arch" type="xml">
<form string="Fiscal year" version="7.0">
<header>
<button name="create_periods" groups="account_fiscal_year_period.group_fiscal_year_create" states="draft" string="Create Periods" type="object" class="oe_highlight"/>
<button name="open" states="draft" groups="account_fiscal_year_period.group_fiscal_year_create" string="Open" type="object" class="oe_highlight"/>
<button name="done" states="open" string="Close" groups="account_fiscal_year_period.group_fiscal_year_close" type="object" class="oe_highlight" confirm="are you sure closed year and periods?"/>
<button name="set_to_draft" states="open,done" groups="account_fiscal_year_period.group_fiscal_year_create" string="Set To Draft" type="object" class="oe_highlight"/>
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open" />
</header>
<sheet>
<group>
<group>
<field name="code" force_save="1"/>
<field name="fiscal_year_id" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="company_id" groups="base.group_multi_company" readonly='1'/>
</group>
<group>
<field name="date_start" required="1" readonly="1"/>
<field name="date_stop" readonly="1" required="1"/>
</group>
</group>
<notebook>
<page string="Periods">
<field colspan="4" name="period_ids" nolabel="1" widget="one2many_list" attrs="{'readonly':[('state','!=','open')]}">
<tree colors="blue:parent.state == 'draft';green:special==True;gray:special !=true" string="Period" editable="bottom" create="false" delete="false">
<field name="sequence" readonly="1"/>
<field name="code" readonly="1"/>
<field name="date_start" readonly="1"/>
<field name="date_stop" readonly="1"/>
<field name="special" groups="account_fiscal_year_period.group_fiscal_year_open_close"/>
</tree>
</field>
</page>
</notebook>
<div>
<label for="comments"/>
<field name="comments" attrs="{'readonly':[('state','!=','draft')]}"/>
</div>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="account_month_period_view_form" model="ir.ui.view">
<field name="name">account.month.period.view.form</field>
<field name="model">account.month.period</field>
<field name="arch" type="xml">
<form string="">
<sheet>
<group>
<field name="sequence" readonly="1"/>
<field name="code" readonly="1"/>
<field name="date_start" readonly="1"/>
<field name="date_stop" readonly="1"/>
<field name="special"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_account_fiscalyear_periods_tree" model="ir.ui.view">
<field name="name">account.fiscalyear.periods.tree</field>
<field name="model">account.fiscalyear.periods</field>
<field name="arch" type="xml">
<tree decoration-info="state == 'draft'" decoration-success="state == 'open'" string="Fiscalyear">
<field name="code"/>
<field name="fiscal_year_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="state"/>
<field name="date_start"/>
<field name="date_stop"/>
</tree>
</field>
</record>
<!--record id="view_account_fiscalyear_periods_search" model="ir.ui.view">
<field name="name">account.fiscalyear.periods.search</field>
<field name="model">account.fiscalyear.periods</field>
<field name="arch" type="xml">
<search string="Search Fiscalyear">
<field name="fiscal_year_id" string="Fiscal Year"/>
<filter string="Open" domain="[('state','=','open')]" icon="terp-camera_test"/>
<filter string="Closed" domain="[('state','=','done')]" icon="terp-dialog-close"/>
<field name="state"/>
<group expand="0" string="Group By...">
<filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
<filter sting="Fiscal Year" context="{'group_by':'fiscal_year_id'}" />
</group>
</search>
</field>
</record-->
<record id="action_account_fiscalyear" model="ir.actions.act_window">
<field name="name">Fiscal Years</field>
<field name="res_model">account.fiscalyear.periods</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to start a new fiscal year.
</p>
<p>
Define your company's financial year according to your needs. A
financial year is a period at the end of which a company's
accounts are made up (usually 12 months). The financial year is
usually referred to by the date in which it ends. For example,
if a company's financial year ends November 30, 2011, then
everything between December 1, 2010 and November 30, 2011
would be referred to as FY 2011.
</p>
</field>
</record>
<menuitem id="menu_action_account_fiscalyear" name="Fiscal Year Periods" action="action_account_fiscalyear" parent="account_fiscal_year_period.account_fiscal_year"/>
</data>
</odoo>
|