[TYPO] Set the right category for the Point Of Sale
[odoo/odoo.git] / addons / account_budget / account_budget_view.xml
1 <?xml version="1.0" ?>
2 <openerp>
3     <data>
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>
9         </record>
10         <menuitem action="action_account_budget_post_tree" id="menu_action_account_budget_post_tree" parent="account.menu_finance_generic_reporting" sequence="6"/>
11
12         <!--
13     Budgets
14     -->
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">
21                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Budgetary Position"/>
22                     <field name="company_id" groups="base.group_multi_company"/>
23                 </search>
24             </field>
25         </record>
26
27         <record id="view_budget_post_tree" model="ir.ui.view">
28             <field name="name">account.budget.post.tree</field>
29             <field name="model">account.budget.post</field>
30             <field name="type">tree</field>
31             <field name="arch" type="xml">
32                 <tree string="Budgetary Position">
33                     <field name="code"/>
34                     <field name="name"/>
35                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
36                 </tree>
37             </field>
38         </record>
39
40         <record id="open_budget_post_form" model="ir.actions.act_window">
41             <field name="name">Budgetary Positions</field>
42             <field name="res_model">account.budget.post</field>
43             <field name="view_type">form</field>
44             <field name="view_id" ref="view_budget_post_tree"/>
45             <field name="search_view_id" ref="view_budget_post_search"/>
46         </record>
47         <menuitem id="next_id_31" name="Budgets" parent="account.menu_finance" sequence="6"/>
48         <menuitem id="next_id_pos" name="Budgets" parent="account.menu_finance_configuration" sequence="50"/>
49         <menuitem action="open_budget_post_form" id="menu_budget_post_form" parent="next_id_pos" sequence="20"/>
50
51
52         <record model="ir.ui.view" id="view_budget_post_form">
53             <field name="name">account.budget.post.form.inherit</field>
54             <field name="model">account.budget.post</field>
55             <field name="type">form</field>
56             <field name="arch" type="xml">
57                 <form string="Budgetary Position" version="7.0">
58                     <group col="4">
59                         <field name="name"/>
60                         <field name="code"/>
61                         <field name="company_id"  groups="base.group_multi_company" widget="selection"/>
62                     </group>
63                     <notebook>
64                         <page string="Accounts">
65                             <field name="account_ids"/>
66                         </page>
67                         <page string="Budget Lines">
68                             <field name="crossovered_budget_line" widget="one2many_list" mode="graph,tree">
69                                 <graph type="bar" string="Lines">
70                                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
71                                     <field name="planned_amount" operator="+"/>
72                                     <field group="True" name="general_budget_id"/>
73                                 </graph>
74                                 <tree string="Budget Lines"  editable="top">
75                                     <field name="crossovered_budget_id"/>
76                                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
77                                     <field name="date_from"/>
78                                     <field name="date_to"/>
79                                     <field name="paid_date"/>
80                                     <field name="planned_amount" sum="Planned Amount"/>
81                                     <field name="practical_amount" sum="Practical Amount" />
82                                     <field name="theoritical_amount" sum="Theoretical Amount"/>
83                                     <field name="percentage"/>
84                                 </tree>
85                                 <form string="Budget Lines" version="7.0">
86                                     <group col="4">
87                                         <field name="crossovered_budget_id"/>
88                                         <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]" />
89                                         <field name="date_from"/>
90                                         <field name="date_to"/>
91                                         <field name="paid_date"/>
92                                         <field name="planned_amount"/>
93                                         <field name="practical_amount"/>
94                                         <field name="theoritical_amount"/>
95                                         <field name="percentage"/>
96                                     </group>
97                                 </form>
98                             </field>
99                         </page>
100                     </notebook>
101                 </form>
102             </field>
103         </record>
104
105         <record model="ir.ui.view" id="crossovered_budget_view_form">
106             <field name="name">crossovered.budget.view.form</field>
107             <field name="model">crossovered.budget</field>
108             <field name="type">form</field>
109             <field name="arch" type="xml">
110                 <form version="7.0">
111                     <header>
112                         <button string="Confirm" name="confirm" states="draft" type="workflow" class="oe_highlight"/>
113                         <button string="Approve" name="validate" states="confirm" type="workflow" class="oe_highlight"/>
114                         <button string="Done" name="done" states="validate" type="workflow" class="oe_highlight"/>
115                         <button name="draft" states="cancel" string="Reset to Draft" type="workflow" />
116                         <button string="Cancel" name="cancel" states="confirm,validate" type="workflow"/>
117                         <field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
118                     </header>
119                     <sheet string="Budget">
120                         <div class="oe_title">
121                             <label for="name" class="oe_edit_only"/>
122                             <h1>
123                                 <field name="name" attrs="{'readonly':[('state','!=','draft')]}"/>
124                             </h1>
125                         </div>
126                         <group>
127                             <group>
128                                 <field name="creating_user_id" attrs="{'readonly':[('state','!=','draft')]}"/>
129                                 <field name="validating_user_id" readonly="True" attrs="{'readonly':[('state','!=','draft')]}"/>
130                             </group>
131                             <group>
132                                 <field name="code" attrs="{'readonly':[('state','!=','draft')]}"/>
133                                 <label for="date_from" string="Duration"/>
134                                 <div>
135                                     <field name="date_from" class="oe_inline" attrs="{'readonly':[('state','!=','draft')]}"/> - 
136                                     <field name="date_to" class="oe_inline" attrs="{'readonly':[('state','!=','draft')]}" nolabel="1"/>
137                                 </div>
138                                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
139                             </group>
140                         </group>
141                         <notebook>
142                             <page string="Budget Lines">
143                                 <field name="crossovered_budget_line" colspan="4" nolabel="1" attrs="{'readonly':[('state','!=','draft')]}">
144                                     <tree string="Budget Lines">
145                                         <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
146                                         <field name="general_budget_id"/>
147                                         <field name="date_from"/>
148                                         <field name="date_to"/>
149                                         <field name="paid_date"/>
150                                         <field name="planned_amount" sum="Planned Amount"/>
151                                         <field name="practical_amount" sum="Practical Amount"/>
152                                         <field name="theoritical_amount" sum="Theoretical Amount"/>
153                                         <field name="percentage"/>
154                                     </tree>
155                                     <form string="Budget Lines" version="7.0">
156                                         <group>
157                                             <group>
158                                                 <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
159                                                 <field name="general_budget_id"/>
160                                                 <field name="planned_amount"/>
161                                             </group>
162                                             <group>
163                                                 <label for="date_from" string="Duration"/>
164                                                 <div>
165                                                     <field name="date_from" class="oe_inline"/> - 
166                                                     <field name="date_to" class="oe_inline"/>
167                                                 </div>
168                                                 <field name="paid_date"/>
169                                                 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
170                                             </group>
171                                         </group>
172                                     </form>
173                                 </field>
174                             </page>
175                         </notebook>
176                     </sheet>
177                 </form>
178             </field>
179         </record>
180
181         <record model="ir.ui.view" id="crossovered_budget_view_tree">
182             <field name="name">crossovered.budget.view.tree</field>
183             <field name="model">crossovered.budget</field>
184             <field name="type">tree</field>
185             <field name="arch" type="xml">
186                <tree colors="blue:state == 'draft';gray:state in ('done','cancel');black:state in ('confirm','validate')" string="Budget">
187                     <field name="name" colspan="1"/>
188                     <field name="code" colspan="1"/>
189                     <field name="date_from"/>
190                     <field name="date_to"/>
191                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
192                     <field name="creating_user_id"/>
193                     <field name="state"/>
194                 </tree>
195             </field>
196         </record>
197
198         <record id="view_crossovered_budget_search" model="ir.ui.view">
199            <field name="name">crossovered.budget.search</field>
200            <field name="model">crossovered.budget</field>
201            <field name="type">search</field>
202            <field name="arch" type="xml">
203                <search string="Budget">
204                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Budget"/>
205                     <field name="date_from"/>
206                     <field name="date_to"/>
207                     <filter string="Draft" icon="terp-document-new" domain="[('state','=','draft')]" help="Draft Budgets"/>
208                     <filter string="To Approve" icon="terp-camera_test" domain="[('state','=','confirm')]" help="To Approve Budgets" />
209                     <field name="state"/>
210                 </search>
211             </field>
212         </record>
213
214         <record model="ir.actions.act_window" id="act_crossovered_budget_view">
215             <field name="name">Budgets</field>
216             <field name="res_model">crossovered.budget</field>
217             <field name="view_type">form</field>
218             <field name="view_mode">tree,form</field>
219             <field name="view_id" ref="crossovered_budget_view_tree"/>
220             <field name="search_view_id" ref="view_crossovered_budget_search"/>
221             <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>
222         </record>
223         <menuitem parent="next_id_31"
224             id="menu_act_crossovered_budget_view"
225             action="act_crossovered_budget_view" sequence="1" />
226
227         <record model="ir.ui.view" id="view_crossovered_budget_line_tree">
228             <field name="name">crossovered.budget.line.tree</field>
229             <field name="model">crossovered.budget.lines</field>
230             <field name="type">tree</field>
231             <field name="arch" type="xml">
232                 <tree string="Budget Lines">
233                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
234                     <field name="crossovered_budget_id" invisible="1"/>
235                     <field name="general_budget_id"/>
236                     <field name="date_from"/>
237                     <field name="date_to"/>
238                     <field name="paid_date"/>
239                     <field name="planned_amount"/>
240                     <field name="practical_amount"/>
241                     <field name="theoritical_amount"/>
242                     <field name="percentage"/>
243                 </tree>
244             </field>
245         </record>
246         <record model="ir.ui.view" id="view_crossovered_budget_line_form">
247             <field name="name">crossovered.budget.line.form</field>
248             <field name="model">crossovered.budget.lines</field>
249             <field name="type">form</field>
250             <field name="arch" type="xml">
251                 <form string="Budget Lines" version="7.0">
252                     <sheet>
253                         <group col="4">
254                             <field name="crossovered_budget_id"/>
255                             <field name="analytic_account_id"/>
256                             <field name="general_budget_id"/>
257                             <field name="date_from"/>
258                             <field name="date_to"/>
259                             <field name="paid_date"/>
260                             <field name="planned_amount"/>
261                             <field name="practical_amount"/>
262                             <field name="theoritical_amount"/>
263                             <field name="percentage"/>
264                             <field name="company_id" widget="selection" groups="base.group_multi_company"/>
265                         </group>
266                     </sheet>
267                 </form>
268             </field>
269         </record>
270
271         <record model="ir.actions.act_window" id="act_crossovered_budget_lines_view">
272             <field name="name">Budget Lines</field>
273             <field name="res_model">crossovered.budget.lines</field>
274             <field name="view_type">form</field>
275             <field name="view_mode">tree,form</field>
276             <field name="view_id" ref="view_crossovered_budget_line_tree"/>
277         </record>
278
279         <menuitem parent="menu_action_account_budget_post_tree"
280             id="menu_act_crossovered_budget_lines_view"
281             action="act_crossovered_budget_lines_view" />
282
283         <!--  Shortcuts -->
284         <act_window name="Budget Lines"
285             context="{'search_default_analytic_account_id': [active_id], 'default_analytic_account_id': active_id}"
286             res_model="crossovered.budget.lines"
287             src_model="account.analytic.account"
288             id="act_account_analytic_account_cb_lines"/>
289
290
291         <record model="ir.ui.view" id="view_account_analytic_account_form_inherit_budget">
292             <field name="name">account.analytic.account.form.inherot.budget</field>
293             <field name="type">form</field>
294             <field name="model">account.analytic.account</field>
295             <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
296             <field name="arch" type="xml">
297                 <notebook position="inside">
298                     <page string="Budget Lines">
299                             <field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="tree,graph">
300                                 <tree string="Budget Lines" editable="top">
301                                     <field name="crossovered_budget_id"/>
302                                     <field name="general_budget_id"/>
303                                     <field name="date_from"/>
304                                     <field name="date_to"/>
305                                     <field name="paid_date"/>
306                                     <field name="planned_amount"/>
307                                     <field name="practical_amount" sum="Practical Amount"/>
308                                     <field name="theoritical_amount" sum="Theoritical Amount"/>
309                                     <field name="percentage"/>
310                                 </tree>
311                                 <form string="Budget Lines">
312                                     <field name="crossovered_budget_id"/>
313                                     <field name="general_budget_id"/>
314                                     <field name="date_from"/>
315                                     <field name="date_to"/>
316                                     <field name="paid_date"/>
317                                     <field name="planned_amount"/>
318                                 </form>
319                                 <graph type="bar" string="Lines">
320                                     <field name="general_budget_id" />
321                                     <field name="planned_amount" operator="+"/>
322                                     <field group="True" name="analytic_account_id"/>
323                                 </graph>
324                             </field>
325                     </page>
326                 </notebook>
327             </field>
328         </record>
329
330     </data>
331 </openerp>
332
333