~unifield-team/unifield-wm/us-826

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
<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

         <record model="ir.ui.view" id="crossovered_budget_definition_view_tree">
             <field name="name">crossovered.budget_definition.view.tree</field>
             <field name="model">crossovered.budget</field>
             <field name="type">tree</field>
             <field name="inherit_id" ref="account_budget.crossovered_budget_view_tree"/>
             <field name="priority" eval="20"/>
             <field name="arch" type="xml">
                 <data>
                     <field name="company_id" position="replace"/>
                     <field name="creating_user_id" position="replace"/>
                     <field name="state" position="after">
                         <field name="decision_moment"/>
                     </field>
                 </data>
             </field>
         </record>

         <record id="view_crossovered_budget_definition_search" model="ir.ui.view">
             <field name="name">crossovered.budget.definition.search</field>
             <field name="model">crossovered.budget</field>
             <field name="type">search</field>
             <field name="inherit_id" ref="account_budget.view_crossovered_budget_search"/>
             <field name="arch" type="xml">
                 <data>
                     <filter string="To Approve" position="after">
                         <filter name="validated" string="Validated" icon="terp-camera_test" domain="[('state','=','validate')]" help="Validated Budgets" />
                     </filter>
                     <field name="date_to" position="after">
                         <field name="currency_id"/>
                         <field name="decision_moment"/>
                         <field name="analytic_account_id"/>
                     </field>
                 </data>
             </field>
        </record>

        <record model="ir.ui.view" id="crossovered_budget_definition_view_form">
            <field name="name">crossovered.budget_definition.view.form</field>
            <field name="model">crossovered.budget</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="account_budget.crossovered_budget_view_form"/>
            <field name="priority" eval="20"/>
            <field name="arch" type="xml">
                <data>
                    <field name="creating_user_id" position="replace"/>
                    <field name="validating_user_id" position="replace"/>
                    <field name="company_id" position="after">
                       <field name="analytic_account_id" domain="[('type', '=', 'normal')]" attrs="{'readonly':[('state','!=','draft')]}"/>
                       <field name="decision_moment" attrs="{'readonly':[('state','!=','draft')]}"/>
                       <field name="currency_id" attrs="{'readonly':[('state','!=','draft')]}"/>
                    </field>
                    <tree string="Budget Lines" position="replace">
                        <tree string="Budget Lines">
                            <field name="general_budget_code"/>
                            <field name="general_budget_id"/>
                            <field name="planned_amount" sum="Planned Amount" string="Budget Amount"/>
                        </tree>
                    </tree>
                    <form string="Budget Lines" position="replace">
                        <form string="Budget Lines">
                            <field name="general_budget_id" select="1"/>
                            <field name="planned_amount" string="Budget Amount" select="1"/>
                        </form>
                    </form>
                    <button name="confirm" position="replace"/>
                    <button name="cancel" position="replace"/>
                    <button name="draft" position="replace"/>
                    <button string="Approve" position="replace">
                        <button string="Approve" name="validate" states="draft" type="workflow" icon="gtk-ok"/>
                    </button>
                </data>
            </field>
        </record>

        <record model="ir.actions.act_window" id="account_budget.act_crossovered_budget_view">
            <field name="name">Budgets</field>
            <field name="res_model">crossovered.budget</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="view_id" ref="crossovered_budget_definition_view_tree"/>
            <field name="search_view_id" ref="view_crossovered_budget_definition_search"/>
            <field name="context">{'search_default_validated': 1}</field>
            <field name="help">A budget is a forecast of your company's income and expenses expected for a period in the future. With a budget, a company is able to carefully look at how much money they are taking in during a given period, and figure out the best way to divide it among various categories. By keeping track of where your money goes, you may be less likely to overspend, and more likely to meet your financial goals. Forecast a budget by detailing the expected revenue per analytic account and monitor its evolution based on the actuals realised during that period.</field>
        </record>

    </data>
</openerp>