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="type">search</field>
19 <field name="arch" type="xml">
20 <search string="Budgetary Position">
23 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
28 <record id="view_budget_post_tree" model="ir.ui.view">
29 <field name="name">account.budget.post.tree</field>
30 <field name="model">account.budget.post</field>
31 <field name="type">tree</field>
32 <field name="arch" type="xml">
33 <tree string="Budgetary Position">
36 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
41 <record id="open_budget_post_form" model="ir.actions.act_window">
42 <field name="name">Budgetary Positions</field>
43 <field name="res_model">account.budget.post</field>
44 <field name="view_type">form</field>
45 <field name="view_id" ref="view_budget_post_tree"/>
46 <field name="search_view_id" ref="view_budget_post_search"/>
48 <menuitem id="next_id_31" name="Budgets" parent="account.menu_finance" sequence="5"/>
49 <menuitem id="next_id_pos" name="Budgets" parent="account.menu_finance_configuration" sequence="20"/>
50 <menuitem action="open_budget_post_form" id="menu_budget_post_form" parent="next_id_pos" sequence="20"/>
53 <record model="ir.ui.view" id="view_budget_post_form">
54 <field name="name">account.budget.post.form.inherit</field>
55 <field name="model">account.budget.post</field>
56 <field name="type">form</field>
57 <field name="arch" type="xml">
58 <form string="Budgetary Position">
59 <field name="name" select="1"/>
60 <field name="code" select="1"/>
61 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
62 <notebook colspan="4">
63 <page string="Accounts">
64 <field name="account_ids" colspan="4" nolabel="1"/>
66 <page string="Budget Lines">
67 <field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="graph,tree">
68 <graph type="bar" string="Lines">
69 <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
70 <field name="planned_amount" operator="+"/>
71 <field group="True" name="general_budget_id"/>
73 <tree string="Budget Lines" editable="top">
74 <field name="crossovered_budget_id"/>
75 <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
76 <field name="date_from"/>
77 <field name="date_to"/>
78 <field name="paid_date"/>
79 <field name="planned_amount" sum="Planned Amount"/>
80 <field name="practical_amount" select="1" sum="Practical Amount" />
81 <field name="theoritical_amount" sum="Theoritical Amount"/>
82 <field name="percentage"/>
84 <form string="Budget Lines">
85 <field name="crossovered_budget_id"/>
86 <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]" />
87 <field name="date_from"/>
88 <field name="date_to"/>
89 <field name="paid_date"/>
90 <field name="planned_amount"/>
91 <field name="practical_amount" select="1"/>
92 <field name="theoritical_amount"/>
93 <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="type">form</field>
106 <field name="arch" type="xml">
107 <form string="Budget">
108 <field name="name" colspan="1" select="1" attrs="{'readonly':[('state','!=','draft')]}"/>
109 <field name="code" colspan="1" select="1" attrs="{'readonly':[('state','!=','draft')]}"/>
110 <field name="creating_user_id" attrs="{'readonly':[('state','!=','draft')]}"/>
111 <field name="validating_user_id" readonly="True" attrs="{'readonly':[('state','!=','draft')]}"/>
112 <field name="date_from" attrs="{'readonly':[('state','!=','draft')]}"/>
113 <field name="date_to" attrs="{'readonly':[('state','!=','draft')]}"/>
114 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
115 <field name="crossovered_budget_line" colspan="4" nolabel="1" attrs="{'readonly':[('state','!=','draft')]}">
116 <tree string="Budget Lines">
117 <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
118 <field name="general_budget_id"/>
119 <field name="date_from"/>
120 <field name="date_to"/>
121 <field name="paid_date"/>
122 <field name="planned_amount" sum="Planned Amount"/>
123 <field name="practical_amount" sum="Practical Amount"/>
124 <field name="theoritical_amount" sum="Theoritical Amount"/>
125 <field name="percentage"/>
127 <form string="Budget Lines">
128 <field name="analytic_account_id" select="1" groups="analytic.group_analytic_accounting"/>
129 <field name="general_budget_id" select="1"/>
130 <field name="date_from"/>
131 <field name="date_to"/>
132 <field name="paid_date" select="1"/>
133 <field name="planned_amount" select="1"/>
134 <field name="analytic_account_id"/>
135 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
138 <field name="state" select="1"/>
139 <group col="4" colspan="2">
140 <button string="Cancel" name="cancel" states="confirm,validate" type="workflow" icon="gtk-cancel"/>
141 <button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-apply" />
142 <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-ok"/>
143 <button string="Done" name="done" states="validate" type="workflow" icon="gtk-jump-to" />
144 <button name="draft" states="cancel" string="Reset to Draft" type="workflow" icon="terp-stock_effects-object-colorize"/>
151 <record model="ir.ui.view" id="crossovered_budget_view_tree">
152 <field name="name">crossovered.budget.view.tree</field>
153 <field name="model">crossovered.budget</field>
154 <field name="type">tree</field>
155 <field name="arch" type="xml">
156 <tree colors="blue:state in ('draft');gray:state in ('done','cancel');black:state in ('confirm','validate')" string="Budget">
157 <field name="name" colspan="1"/>
158 <field name="code" colspan="1"/>
159 <field name="date_from"/>
160 <field name="date_to"/>
161 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
162 <field name="creating_user_id"/>
163 <field name="state"/>
168 <record id="view_crossovered_budget_search" model="ir.ui.view">
169 <field name="name">crossovered.budget.search</field>
170 <field name="model">crossovered.budget</field>
171 <field name="type">search</field>
172 <field name="arch" type="xml">
173 <search string="Budget">
174 <group col="20" colspan="4">
175 <filter string="Draft" icon="terp-document-new" domain="[('state','=','draft')]" help="Draft Budgets" default="1"/>
176 <filter string="To Approve" icon="terp-gtk-media-pause" domain="[('state','=','confirm')]" help="To Approve Budgets" />
177 <separator orientation="vertical"/>
178 <field name="name" select="1"/>
179 <field name="code" select="1" />
180 <field name="state"/>
181 <field name="date_from"/>
182 <field name="date_to"/>
188 <record model="ir.actions.act_window" id="act_crossovered_budget_view">
189 <field name="name">Budgets</field>
190 <field name="res_model">crossovered.budget</field>
191 <field name="view_type">form</field>
192 <field name="view_mode">tree,form</field>
193 <field name="view_id" ref="crossovered_budget_view_tree"/>
194 <field name="search_view_id" ref="view_crossovered_budget_search"/>
196 <menuitem parent="next_id_31"
197 id="menu_act_crossovered_budget_view"
198 action="act_crossovered_budget_view" sequence="1" />
200 <record model="ir.ui.view" id="view_crossovered_budget_line_tree">
201 <field name="name">crossovered.budget.line.tree</field>
202 <field name="model">crossovered.budget.lines</field>
203 <field name="type">tree</field>
204 <field name="arch" type="xml">
205 <tree string="Budget Lines">
206 <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
207 <field name="general_budget_id"/>
208 <field name="date_from"/>
209 <field name="date_to"/>
210 <field name="paid_date"/>
211 <field name="planned_amount"/>
212 <field name="practical_amount" select="1"/>
213 <field name="theoritical_amount"/>
214 <field name="percentage"/>
218 <record model="ir.ui.view" id="view_crossovered_budget_line_form">
219 <field name="name">crossovered.budget.line.form</field>
220 <field name="model">crossovered.budget.lines</field>
221 <field name="type">form</field>
222 <field name="arch" type="xml">
223 <form string="Budget Lines">
224 <field name="crossovered_budget_id"/>
225 <field name="analytic_account_id" select="1" groups="analytic.group_analytic_accounting"/>
226 <field name="general_budget_id" select="1"/>
227 <field name="date_from"/>
228 <field name="date_to"/>
229 <field name="paid_date" select="1"/>
230 <field name="planned_amount" select="1"/>
231 <field name="practical_amount" select="1"/>
232 <field name="theoritical_amount"/>
233 <field name="percentage"/>
234 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
239 <record model="ir.actions.act_window" id="act_crossovered_budget_lines_view">
240 <field name="name">Budget Lines</field>
241 <field name="res_model">crossovered.budget.lines</field>
242 <field name="view_type">form</field>
243 <field name="view_mode">tree,form</field>
244 <field name="view_id" ref="view_crossovered_budget_line_tree"/>
247 <menuitem parent="menu_action_account_budget_post_tree"
248 id="menu_act_crossovered_budget_lines_view"
249 action="act_crossovered_budget_lines_view" />
252 <act_window name="Budget Lines"
253 context="{'search_default_analytic_account_id': [active_id]}"
254 res_model="crossovered.budget.lines"
255 src_model="account.analytic.account"
256 id="act_account_analytic_account_cb_lines"/>
259 <record model="ir.ui.view" id="view_account_analytic_account_form_inherit_budget">
260 <field name="name">account.analytic.account.form.inherot.budget</field>
261 <field name="type">form</field>
262 <field name="model">account.analytic.account</field>
263 <field name="inherit_id" ref="account.view_account_analytic_account_form"/>
264 <field name="arch" type="xml">
265 <notebook position="inside">
266 <page string="Budget Lines">
267 <field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="tree,graph">
268 <tree string="Budget Lines" editable="top">
269 <field name="crossovered_budget_id"/>
270 <field name="general_budget_id"/>
271 <field name="date_from"/>
272 <field name="date_to"/>
273 <field name="paid_date"/>
274 <field name="planned_amount"/>
276 <form string="Budget Lines">
277 <field name="crossovered_budget_id"/>
278 <field name="general_budget_id"/>
279 <field name="date_from"/>
280 <field name="date_to"/>
281 <field name="paid_date"/>
282 <field name="planned_amount"/>
284 <graph type="bar" string="Lines">
285 <field name="general_budget_id" />
286 <field name="planned_amount" operator="+"/>
287 <field group="True" name="analytic_account_id"/>