4 <!-- budget form and tree view from account module *********************************** -->
5 <record id="action_account_budget_post_tree" model="ir.actions.act_window">
6 <field name="name">Budgets</field>
7 <field name="res_model">account.budget.post</field>
8 <field name="view_type">tree</field>
10 <menuitem action="action_account_budget_post_tree" id="menu_action_account_budget_post_tree" parent="account.menu_finance_generic_reporting" sequence="6"/>
16 <record id="view_budget_post_tree" model="ir.ui.view">
17 <field name="name">account.budget.post.tree</field>
18 <field name="model">account.budget.post</field>
19 <field name="type">tree</field>
20 <field name="arch" type="xml">
21 <tree string="Budgetary Position">
24 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
28 <record id="view_budget_post_dotation_form" model="ir.ui.view">
29 <field name="name">account.budget.post.dotation.form</field>
30 <field name="model">account.budget.post.dotation</field>
31 <field name="type">form</field>
32 <field name="arch" type="xml">
33 <form string="Budget Dotation">
34 <field name="period_id"/>
35 <field name="amount"/>
36 <field name="tot_planned" />
40 <record id="view_budget_post_dotation_tree" model="ir.ui.view">
41 <field name="name">account.budget.post.dotation.tree</field>
42 <field name="model">account.budget.post.dotation</field>
43 <field name="type">tree</field>
44 <field name="arch" type="xml">
45 <tree string="Budget Dotations">
46 <field name="period_id"/>
47 <field name="amount"/>
48 <field name="tot_planned" />
53 <record id="open_budget_post_form" model="ir.actions.act_window">
54 <field name="name">Budgetary Positions</field>
55 <field name="res_model">account.budget.post</field>
56 <field name="view_type">form</field>
57 <field name="view_id" ref="view_budget_post_tree"/>
59 <menuitem id="next_id_31" name="Budgets" parent="account.menu_finance" sequence="5"/>
60 <menuitem id="next_id_pos" name="Budgets" parent="account.menu_finance_configuration" sequence="20"/>
61 <menuitem action="open_budget_post_form" id="menu_budget_post_form" parent="next_id_pos" sequence="20"/>
64 <record model="ir.ui.view" id="view_budget_post_form">
65 <field name="name">account.budget.post.form.inherit</field>
66 <field name="model">account.budget.post</field>
67 <field name="type">form</field>
68 <field name="arch" type="xml">
69 <form string="Budgetary Position">
70 <field name="name" select="1"/>
71 <field name="code" select="1"/>
72 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
73 <notebook colspan="4">
74 <page string="Accounts">
75 <field name="account_ids" colspan="4" nolabel="1"/>
77 <page string="Budget Lines">
78 <field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="graph,tree">
79 <graph type="bar" string="Lines">
80 <field name="analytic_account_id" groups="base.group_extended"/>
81 <field name="planned_amount" operator="+"/>
82 <field group="True" name="general_budget_id"/>
84 <tree string="Budget Lines" editable="top">
85 <field name="crossovered_budget_id"/>
86 <field name="analytic_account_id" groups="base.group_extended" domain="[('parent_id','!=',False)]"/>
87 <field name="date_from"/>
88 <field name="date_to"/>
89 <field name="paid_date"/>
90 <field name="planned_amount" sum="Planned Amount"/>
91 <field name="practical_amount" select="1" sum="Practical Amount" />
92 <field name="theoritical_amount" sum="Theoritical Amount"/>
93 <field name="percentage"/>
95 <form string="Budget Lines">
96 <field name="crossovered_budget_id"/>
97 <field name="analytic_account_id" groups="base.group_extended" domain="[('parent_id','!=',False)]" />
98 <field name="date_from"/>
99 <field name="date_to"/>
100 <field name="paid_date"/>
101 <field name="planned_amount"/>
102 <field name="practical_amount" select="1"/>
103 <field name="theoritical_amount"/>
104 <field name="percentage"/>
113 <record model="ir.ui.view" id="crossovered_budget_view_form">
114 <field name="name">crossovered.budget.view.form</field>
115 <field name="model">crossovered.budget</field>
116 <field name="type">form</field>
117 <field name="arch" type="xml">
118 <form string="Budget">
119 <field name="name" colspan="1" select="1" attrs="{'readonly':[('state','!=','draft')]}"/>
120 <field name="code" colspan="1" select="1" attrs="{'readonly':[('state','!=','draft')]}"/>
121 <field name="creating_user_id" attrs="{'readonly':[('state','!=','draft')]}"/>
122 <field name="validating_user_id" readonly="True" attrs="{'readonly':[('state','!=','draft')]}"/>
123 <field name="date_from" attrs="{'readonly':[('state','!=','draft')]}"/>
124 <field name="date_to" attrs="{'readonly':[('state','!=','draft')]}"/>
125 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
126 <field name="crossovered_budget_line" colspan="4" nolabel="1" attrs="{'readonly':[('state','!=','draft')]}">
127 <tree string="Budget Lines">
128 <field name="analytic_account_id" groups="base.group_extended"/>
129 <field name="general_budget_id"/>
130 <field name="date_from"/>
131 <field name="date_to"/>
132 <field name="paid_date"/>
133 <field name="planned_amount" sum="Planned Amount"/>
134 <field name="practical_amount" sum="Practical Amount"/>
135 <field name="theoritical_amount" sum="Theoritical Amount"/>
136 <field name="percentage"/>
138 <form string="Budget Lines">
139 <field name="analytic_account_id" select="1" groups="base.group_extended"/>
140 <field name="general_budget_id" select="1"/>
141 <field name="date_from"/>
142 <field name="date_to"/>
143 <field name="paid_date" select="1"/>
144 <field name="planned_amount" select="1"/>
145 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
148 <field name="state" select="1"/>
149 <group col="4" colspan="2">
150 <button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-apply" />
151 <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-ok"/>
152 <button string="Done" name="done" states="validate" type="workflow" icon="gtk-jump-to" />
153 <button string="Cancel" name="cancel" states="confirm,validate" type="workflow" icon="gtk-cancel"/>
154 <button name="draft" states="cancel" string="Reset to Draft" type="workflow" icon="terp-stock_effects-object-colorize"/>
161 <record model="ir.ui.view" id="crossovered_budget_view_tree">
162 <field name="name">crossovered.budget.view.tree</field>
163 <field name="model">crossovered.budget</field>
164 <field name="type">tree</field>
165 <field name="arch" type="xml">
166 <tree colors="blue:state in ('draft');gray:state in ('done','cancel');black:state in ('confirm','validate')" string="Budget">
167 <field name="name" colspan="1"/>
168 <field name="code" colspan="1"/>
169 <field name="date_from"/>
170 <field name="date_to"/>
171 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
172 <field name="creating_user_id"/>
173 <field name="state"/>
178 <record id="view_crossovered_budget_search" model="ir.ui.view">
179 <field name="name">crossovered.budget.search</field>
180 <field name="model">crossovered.budget</field>
181 <field name="type">search</field>
182 <field name="arch" type="xml">
183 <search string="Budget">
184 <group col="20" colspan="4">
185 <filter string="Draft" icon="terp-document-new" domain="[('state','=','draft')]" help="Draft Budgets" default="1"/>
186 <filter string="To Approve" icon="terp-gtk-media-pause" domain="[('state','=','confirm')]" help="To Approve Budgets" />
187 <separator orientation="vertical"/>
188 <field name="name" select="1"/>
189 <field name="code" select="1" />
190 <field name="state"/>
191 <field name="date_from"/>
192 <field name="date_to"/>
198 <record model="ir.actions.act_window" id="act_crossovered_budget_view">
199 <field name="name">Budget</field>
200 <field name="res_model">crossovered.budget</field>
201 <field name="view_type">form</field>
202 <field name="view_mode">tree,form</field>
203 <field name="view_id" ref="crossovered_budget_view_tree"/>
204 <field name="search_view_id" ref="view_crossovered_budget_search"/>
206 <menuitem parent="next_id_31"
207 id="menu_act_crossovered_budget_view"
208 action="act_crossovered_budget_view" sequence="1" />
210 <record model="ir.ui.view" id="view_crossovered_budget_line_tree">
211 <field name="name">crossovered.budget.line.tree</field>
212 <field name="model">crossovered.budget.lines</field>
213 <field name="type">tree</field>
214 <field name="arch" type="xml">
215 <tree string="Budget Lines">
216 <field name="analytic_account_id" groups="base.group_extended"/>
217 <field name="general_budget_id"/>
218 <field name="date_from"/>
219 <field name="date_to"/>
220 <field name="paid_date"/>
221 <field name="planned_amount"/>
222 <field name="practical_amount" select="1"/>
223 <field name="theoritical_amount"/>
224 <field name="percentage"/>
228 <record model="ir.ui.view" id="view_crossovered_budget_line_form">
229 <field name="name">crossovered.budget.line.form</field>
230 <field name="model">crossovered.budget.lines</field>
231 <field name="type">form</field>
232 <field name="arch" type="xml">
233 <form string="Budget Lines">
234 <field name="crossovered_budget_id"/>
235 <field name="analytic_account_id" select="1" groups="base.group_extended"/>
236 <field name="general_budget_id" select="1"/>
237 <field name="date_from"/>
238 <field name="date_to"/>
239 <field name="paid_date" select="1"/>
240 <field name="planned_amount" select="1"/>
241 <field name="practical_amount" select="1"/>
242 <field name="theoritical_amount"/>
243 <field name="percentage"/>
244 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
249 <record model="ir.actions.act_window" id="act_crossovered_budget_lines_view">
250 <field name="name">Budget Lines</field>
251 <field name="res_model">crossovered.budget.lines</field>
252 <field name="view_type">form</field>
253 <field name="view_mode">tree,form</field>
254 <field name="view_id" ref="view_crossovered_budget_line_tree"/>
257 <menuitem parent="menu_action_account_budget_post_tree"
258 id="menu_act_crossovered_budget_lines_view"
259 action="act_crossovered_budget_lines_view" />
262 <act_window name="Budget Lines"
263 context="{'search_default_analytic_account_id': [active_id]}"
264 res_model="crossovered.budget.lines"
265 src_model="account.analytic.account"
266 id="act_account_analytic_account_cb_lines"/>
269 <record model="ir.ui.view" id="view_account_analytic_account_form_inherit_budget">
270 <field name="name">account.analytic.account.form.inherot.budget</field>
271 <field name="type">form</field>
272 <field name="model">account.analytic.account</field>
273 <field name="inherit_id" ref="account.view_account_analytic_account_form"/>
274 <field name="arch" type="xml">
275 <notebook position="inside">
276 <page string="Budget Lines">
277 <field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="tree,graph">
278 <tree string="Budget Lines" editable="top">
279 <field name="crossovered_budget_id"/>
280 <field name="general_budget_id"/>
281 <field name="date_from"/>
282 <field name="date_to"/>
283 <field name="paid_date"/>
284 <field name="planned_amount"/>
286 <form string="Budget Lines">
287 <field name="crossovered_budget_id"/>
288 <field name="general_budget_id"/>
289 <field name="date_from"/>
290 <field name="date_to"/>
291 <field name="paid_date"/>
292 <field name="planned_amount"/>
294 <graph type="bar" string="Lines">
295 <field name="general_budget_id" />
296 <field name="planned_amount" operator="+"/>
297 <field group="True" name="analytic_account_id"/>