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"/>
15 <record id="view_budget_post_search" model="ir.ui.view">
16 <field name="name">account.budget.post.search</field>
17 <field name="model">account.budget.post</field>
18 <field name="arch" type="xml">
19 <search string="Budgetary Position">
20 <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Budgetary Position"/>
21 <field name="company_id" groups="base.group_multi_company"/>
26 <record id="view_budget_post_tree" model="ir.ui.view">
27 <field name="name">account.budget.post.tree</field>
28 <field name="model">account.budget.post</field>
29 <field name="arch" type="xml">
30 <tree string="Budgetary Position">
33 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
38 <record id="open_budget_post_form" model="ir.actions.act_window">
39 <field name="name">Budgetary Positions</field>
40 <field name="res_model">account.budget.post</field>
41 <field name="view_type">form</field>
42 <field name="view_id" ref="view_budget_post_tree"/>
43 <field name="search_view_id" ref="view_budget_post_search"/>
45 <menuitem id="next_id_31" name="Budgets" parent="account.menu_finance" sequence="6"/>
46 <menuitem id="next_id_pos" name="Budgets" parent="account.menu_finance_configuration" sequence="50"/>
47 <menuitem action="open_budget_post_form" id="menu_budget_post_form" parent="next_id_pos" sequence="20"/>
50 <record model="ir.ui.view" id="view_budget_post_form">
51 <field name="name">account.budget.post.form.inherit</field>
52 <field name="model">account.budget.post</field>
53 <field name="arch" type="xml">
54 <form string="Budgetary Position" version="7.0">
58 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
61 <page string="Accounts">
62 <field name="account_ids"/>
64 <page string="Budget Lines">
65 <field name="crossovered_budget_line" widget="one2many_list" mode="graph,tree">
66 <graph type="bar" string="Lines">
67 <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
68 <field name="planned_amount" operator="+"/>
69 <field group="True" name="general_budget_id"/>
71 <tree string="Budget Lines" editable="top">
72 <field name="crossovered_budget_id"/>
73 <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
74 <field name="date_from"/>
75 <field name="date_to"/>
76 <field name="paid_date"/>
77 <field name="planned_amount" sum="Planned Amount"/>
78 <field name="practical_amount" sum="Practical Amount" />
79 <field name="theoritical_amount" sum="Theoretical Amount"/>
80 <field name="percentage"/>
82 <form string="Budget Lines" version="7.0">
84 <field name="crossovered_budget_id"/>
85 <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]" />
86 <field name="date_from"/>
87 <field name="date_to"/>
88 <field name="paid_date"/>
89 <field name="planned_amount"/>
90 <field name="practical_amount"/>
91 <field name="theoritical_amount"/>
92 <field name="percentage"/>
102 <record model="ir.ui.view" id="crossovered_budget_view_form">
103 <field name="name">crossovered.budget.view.form</field>
104 <field name="model">crossovered.budget</field>
105 <field name="arch" type="xml">
106 <form string="Budget" version="7.0">
108 <button string="Confirm" name="confirm" states="draft" type="workflow" class="oe_highlight"/>
109 <button string="Approve" name="validate" states="confirm" type="workflow" class="oe_highlight"/>
110 <button string="Done" name="done" states="validate" type="workflow" class="oe_highlight"/>
111 <button name="draft" states="cancel" string="Reset to Draft" type="workflow" />
112 <button string="Cancel" name="cancel" states="confirm,validate" type="workflow"/>
113 <field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
115 <sheet string="Budget">
116 <div class="oe_title">
117 <label for="name" class="oe_edit_only"/>
119 <field name="name" attrs="{'readonly':[('state','!=','draft')]}"/>
124 <field name="creating_user_id" attrs="{'readonly':[('state','!=','draft')]}"/>
125 <field name="validating_user_id" readonly="True" attrs="{'readonly':[('state','!=','draft')]}"/>
128 <field name="code" attrs="{'readonly':[('state','!=','draft')]}"/>
129 <label for="date_from" string="Duration"/>
131 <field name="date_from" class="oe_inline" attrs="{'readonly':[('state','!=','draft')]}"/> -
132 <field name="date_to" class="oe_inline" attrs="{'readonly':[('state','!=','draft')]}" nolabel="1"/>
134 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
138 <page string="Budget Lines">
139 <field name="crossovered_budget_line" colspan="4" nolabel="1" attrs="{'readonly':[('state','!=','draft')]}">
140 <tree string="Budget Lines">
141 <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
142 <field name="general_budget_id"/>
143 <field name="date_from"/>
144 <field name="date_to"/>
145 <field name="paid_date"/>
146 <field name="planned_amount" sum="Planned Amount"/>
147 <field name="practical_amount" sum="Practical Amount"/>
148 <field name="theoritical_amount" sum="Theoretical Amount"/>
149 <field name="percentage"/>
151 <form string="Budget Lines" version="7.0">
154 <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
155 <field name="general_budget_id"/>
156 <field name="planned_amount"/>
159 <label for="date_from" string="Duration"/>
161 <field name="date_from" class="oe_inline"/> -
162 <field name="date_to" class="oe_inline"/>
164 <field name="paid_date"/>
165 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
177 <record model="ir.ui.view" id="crossovered_budget_view_tree">
178 <field name="name">crossovered.budget.view.tree</field>
179 <field name="model">crossovered.budget</field>
180 <field name="arch" type="xml">
181 <tree colors="blue:state == 'draft';gray:state in ('done','cancel');black:state in ('confirm','validate')" string="Budget">
182 <field name="name" colspan="1"/>
183 <field name="code" colspan="1"/>
184 <field name="date_from"/>
185 <field name="date_to"/>
186 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
187 <field name="creating_user_id"/>
188 <field name="state"/>
193 <record id="view_crossovered_budget_search" model="ir.ui.view">
194 <field name="name">crossovered.budget.search</field>
195 <field name="model">crossovered.budget</field>
196 <field name="arch" type="xml">
197 <search string="Budget">
198 <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Budget"/>
199 <field name="date_from"/>
200 <field name="date_to"/>
201 <filter string="Draft" icon="terp-document-new" domain="[('state','=','draft')]" help="Draft Budgets"/>
202 <filter string="To Approve" icon="terp-camera_test" domain="[('state','=','confirm')]" help="To Approve Budgets" />
203 <field name="state"/>
208 <record model="ir.actions.act_window" id="act_crossovered_budget_view">
209 <field name="name">Budgets</field>
210 <field name="res_model">crossovered.budget</field>
211 <field name="view_type">form</field>
212 <field name="view_mode">tree,form</field>
213 <field name="view_id" ref="crossovered_budget_view_tree"/>
214 <field name="search_view_id" ref="view_crossovered_budget_search"/>
215 <field name="help" type="html">
217 A budget is a forecast of your company's income and/or expenses
218 expected for a period in the future. A budget is defined on some
219 financial accounts and/or analytic accounts (that may represent
220 projects, departments, categories of products, etc.)
222 By keeping track of where your money goes, you may be less
223 likely to overspend, and more likely to meet your financial
224 goals. Forecast a budget by detailing the expected revenue per
225 analytic account and monitor its evolution based on the actuals
226 realised during that period.
230 <menuitem parent="next_id_31"
231 id="menu_act_crossovered_budget_view"
232 action="act_crossovered_budget_view" sequence="1" />
234 <record model="ir.ui.view" id="view_crossovered_budget_line_tree">
235 <field name="name">crossovered.budget.line.tree</field>
236 <field name="model">crossovered.budget.lines</field>
237 <field name="arch" type="xml">
238 <tree string="Budget Lines">
239 <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
240 <field name="crossovered_budget_id" invisible="1"/>
241 <field name="general_budget_id"/>
242 <field name="date_from"/>
243 <field name="date_to"/>
244 <field name="paid_date"/>
245 <field name="planned_amount"/>
246 <field name="practical_amount"/>
247 <field name="theoritical_amount"/>
248 <field name="percentage"/>
252 <record model="ir.ui.view" id="view_crossovered_budget_line_form">
253 <field name="name">crossovered.budget.line.form</field>
254 <field name="model">crossovered.budget.lines</field>
255 <field name="arch" type="xml">
256 <form string="Budget Lines" version="7.0">
259 <field name="crossovered_budget_id"/>
260 <field name="analytic_account_id"/>
261 <field name="general_budget_id"/>
262 <field name="date_from"/>
263 <field name="date_to"/>
264 <field name="paid_date"/>
265 <field name="planned_amount"/>
266 <field name="practical_amount"/>
267 <field name="theoritical_amount"/>
268 <field name="percentage"/>
269 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
276 <record model="ir.actions.act_window" id="act_crossovered_budget_lines_view">
277 <field name="name">Budget Lines</field>
278 <field name="res_model">crossovered.budget.lines</field>
279 <field name="view_type">form</field>
280 <field name="view_mode">tree,form</field>
281 <field name="view_id" ref="view_crossovered_budget_line_tree"/>
284 <menuitem parent="menu_action_account_budget_post_tree"
285 id="menu_act_crossovered_budget_lines_view"
286 action="act_crossovered_budget_lines_view" />
289 <act_window name="Budget Lines"
290 context="{'search_default_analytic_account_id': [active_id], 'default_analytic_account_id': active_id}"
291 res_model="crossovered.budget.lines"
292 src_model="account.analytic.account"
293 id="act_account_analytic_account_cb_lines"/>
296 <record model="ir.ui.view" id="view_account_analytic_account_form_inherit_budget">
297 <field name="name">account.analytic.account.form.inherot.budget</field>
298 <field name="model">account.analytic.account</field>
299 <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
300 <field name="arch" type="xml">
301 <notebook position="inside">
302 <page string="Budget Lines">
303 <field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="tree,graph">
304 <tree string="Budget Lines" editable="top">
305 <field name="crossovered_budget_id"/>
306 <field name="general_budget_id"/>
307 <field name="date_from"/>
308 <field name="date_to"/>
309 <field name="paid_date"/>
310 <field name="planned_amount"/>
311 <field name="practical_amount" sum="Practical Amount"/>
312 <field name="theoritical_amount" sum="Theoritical Amount"/>
313 <field name="percentage"/>
315 <form string="Budget Lines">
316 <field name="crossovered_budget_id"/>
317 <field name="general_budget_id"/>
318 <field name="date_from"/>
319 <field name="date_to"/>
320 <field name="paid_date"/>
321 <field name="planned_amount"/>
323 <graph type="bar" string="Lines">
324 <field name="general_budget_id" />
325 <field name="planned_amount" operator="+"/>
326 <field group="True" name="analytic_account_id"/>