1 <?xml version="1.0" encoding="utf-8"?>
5 <record id="view_account_analytic_account_list" model="ir.ui.view">
6 <field name="name">account.analytic.account.list</field>
7 <field name="model">account.analytic.account</field>
8 <field name="type">tree</field>
9 <field eval="8" name="priority"/>
10 <field name="arch" type="xml">
11 <tree toolbar="1" colors="red:state=='pending';grey:state in ('cancelled','close');blue:type=='view'" string="Analytic Accounts">
12 <field name="complete_name"/>
14 <field name="quantity"/>
16 <field name="date_start" invisible="1"/>
17 <field name="user_id" invisible="1"/>
18 <field name="parent_id" invisible="1"/>
19 <field name="partner_id" invisible="1"/>
20 <field name="state" invisible="1"/>
21 <field name="type" invisible="1"/>
26 <record id="view_account_analytic_account_search" model="ir.ui.view">
27 <field name="name">account.analytic.account.search</field>
28 <field name="model">account.analytic.account</field>
29 <field name="type">search</field>
30 <field name="arch" type="xml">
31 <search string="Analytic Account">
33 <filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
34 <filter icon="terp-camera_test" string="Current" domain="[('state','=','open')]" help="Current Accounts"/>
35 <separator orientation="vertical"/>
36 <filter icon="terp-go-today" string="Overdue Account" domain="[('date','<',time.strftime('%%Y-%%m-%%d'))]" help="Analytic Accounts with a past deadline."/>
37 <separator orientation="vertical"/>
40 <field name="partner_id"/>
41 <field name="user_id" widget="selection"/>
44 <group expand="0" string="Group By...">
45 <filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
46 <filter string="Associated Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
47 <separator orientation="vertical"/>
48 <filter string="Parent Account" icon="terp-folder-green" domain="[]" context="{'group_by':'parent_id'}"/>
49 <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/>
55 <record id="view_account_analytic_account_tree" model="ir.ui.view">
56 <field name="name">account.analytic.account.tree</field>
57 <field name="model">account.analytic.account</field>
58 <field name="type">tree</field>
59 <field name="field_parent">child_complete_ids</field>
60 <field name="arch" type="xml">
61 <tree colors="blue:state=='pending';grey:state in ('close','cancelled');blue:type=='view'" string="Analytic account" toolbar="1">
65 <field name="credit"/>
66 <field name="balance"/>
67 <field name="state" invisible="1"/>
68 <field name="currency_id"/>
69 <field name="date" invisible="1"/>
70 <field name="user_id" invisible="1"/>
71 <field name="partner_id" invisible="1"/>
72 <field name="parent_id" invisible="1"/>
78 <record id="view_account_analytic_account_form" model="ir.ui.view">
79 <field name="name">account.analytic.account.form</field>
80 <field name="model">account.analytic.account</field>
81 <field name="type">form</field>
82 <field name="arch" type="xml">
83 <form layout="manual">
84 <div class="oe_form_topbar">
86 <sheet string="Analytic account" layout="auto">
87 <group colspan="4" col="6">
88 <field name="name" colspan="4"/>
90 <field name="parent_id" on_change="on_change_parent(parent_id)"/>
91 <field name="company_id" on_change="on_change_company(company_id)" select="2" widget="selection" groups="base.group_multi_company" attrs="{'required': [('type','<>','view')]}"/>
92 <field name="type" select="2"/>
94 <notebook colspan="4">
95 <page string="Account Data">
96 <group colspan="2" col="2">
97 <separator colspan="2" string="Contacts"/>
98 <field name="partner_id"/>
99 <field name="user_id"/>
101 <group colspan="2" col="2" name="contract">
102 <separator colspan="2" string="Contract Data"/>
103 <field name="date_start"/>
105 <field name="quantity_max"/>
108 <page string="Description">
109 <field colspan="4" name="description" nolabel="1"/>
117 <record id="action_account_analytic_account_form" model="ir.actions.act_window">
118 <field name="name">Analytic Accounts</field>
119 <field name="type">ir.actions.act_window</field>
120 <field name="res_model">account.analytic.account</field>
121 <field name="view_type">form</field>
122 <field name="view_mode">tree,graph,form</field>
123 <field name="view_id" ref="view_account_analytic_account_tree"/>
124 <field name="search_view_id" ref="account.view_account_analytic_account_search"/>
126 <menuitem action="action_account_analytic_account_form" id="account_analytic_def_account"
127 parent="menu_analytic_accounting"
128 groups="analytic.group_analytic_accounting"/>
130 <record id="act_account_renew_view" model="ir.actions.act_window">
131 <field name="name">Accounts to Renew</field>
132 <field name="type">ir.actions.act_window</field>
133 <field name="res_model">account.analytic.account</field>
134 <field name="view_type">form</field>
135 <field name="view_mode">tree,form</field>
136 <field name="domain">[('date','<',time.strftime('%Y-%m-%d %H:%M:%S'))]</field>
137 <field name="filter" eval="True"/>
140 <record id="action_account_analytic_account_tree2" model="ir.actions.act_window">
141 <field name="name">Chart of Analytic Accounts</field>
142 <field name="res_model">account.analytic.account</field>
143 <field name="view_type">tree</field>
144 <field name="view_id" ref="view_account_analytic_account_tree"/>
145 <field name="domain">[('parent_id','=',False)]</field>
146 <field name="help">The normal chart of accounts has a structure defined by the legal requirement of the country. The analytic chart of accounts structure should reflect your own business needs in term of costs/revenues reporting. They are usually structured by contracts, projects, products or departements. Most of the OpenERP operations (invoices, timesheets, expenses, etc) generate analytic entries on the related account.</field>
149 <menuitem groups="analytic.group_analytic_accounting" id="next_id_40"
150 name="Analytic" parent="account.menu_finance_generic_reporting"
153 <record id="view_account_analytic_line_form" model="ir.ui.view">
154 <field name="name">account.analytic.line.form</field>
155 <field name="model">account.analytic.line</field>
156 <field name="type">form</field>
157 <field name="arch" type="xml">
158 <form string="Analytic Entry">
159 <group colspan="4" col="6">
162 <field name="account_id"/>
163 <field name="journal_id"/>
165 <field name="company_id" groups="base.group_multi_company"/>
167 <group colspan="2" col="4">
168 <separator string="Amount" colspan="4"/>
169 <field name="amount" colspan="4"/>
170 <field name="amount_currency" colspan="2"/>
171 <field name="currency_id" colspan="2" nolabel="1"/>
173 <group colspan="2" col="4">
174 <separator string="Product Information" colspan="4"/>
175 <field name="product_id" colspan="4"/>
176 <field name="unit_amount" colspan="2"/>
177 <field name="product_uom_id" colspan="2" nolabel="1"/>
179 <group colspan="2" col="2">
180 <separator string="General Accounting" colspan="2"/>
181 <field name="general_account_id"/>
182 <field name="move_id" readonly="1"/>
187 <record id="view_account_analytic_line_tree" model="ir.ui.view">
188 <field name="name">account.analytic.line.tree</field>
189 <field name="model">account.analytic.line</field>
190 <field name="type">tree</field>
191 <field name="arch" type="xml">
192 <tree editable="top" string="Analytic Entries">
194 <field name="ref" invisible="context.get('to_invoice', False)"/>
196 <field name="journal_id" invisible="context.get('to_invoice', False)"/>
197 <field name="amount" sum="Total" invisible="context.get('to_invoice', False)"/>
198 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)" invisible="not context.get('to_invoice', False)"/>
199 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total Quantity"/>
200 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" invisible="not context.get('to_invoice', False)"/>
201 <field domain="[('type','=','normal')]" name="account_id"/>
202 <field name="general_account_id" invisible="context.get('to_invoice', False)"/>
203 <field name="user_id" invisible="1" />
207 <record id="view_account_analytic_line_filter" model="ir.ui.view">
208 <field name="name">account.analytic.line.select</field>
209 <field name="model">account.analytic.line</field>
210 <field name="type">search</field>
211 <field name="arch" type="xml">
212 <search string="Search Analytic Lines">
214 <filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" icon="terp-camera_test" help="Analytic Journal Items related to a sale journal."/>
215 <filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" icon="terp-purchase" help="Analytic Journal Items related to a purchase journal."/>
216 <filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation'))]" icon="terp-folder-orange"/>
217 <separator orientation="vertical"/>
220 <field name="account_id"/>
221 <field name="user_id">
222 <filter string="My Entries" domain="[('user_id','=',uid)]" icon="terp-personal"/>
226 <group string="Group By..." expand="0">
227 <filter string="Account" context="{'group_by':'account_id'}" icon="terp-folder-green"/>
228 <filter string="Journal" context="{'group_by':'journal_id'}" icon="terp-folder-orange"/>
229 <filter string="User" context="{'group_by':'user_id'}" icon="terp-personal"/>
230 <separator orientation="vertical"/>
231 <filter string="Fin.Account" context="{'group_by':'general_account_id'}" icon="terp-folder-green"/>
232 <separator orientation="vertical"/>
233 <filter string="Product" context="{'group_by':'product_id'}" icon="terp-accessories-archiver"/>
238 <record id="action_account_analytic_line_form" model="ir.actions.act_window">
239 <field name="name">Analytic Entries</field>
240 <field name="type">ir.actions.act_window</field>
241 <field name="res_model">account.analytic.line</field>
242 <field name="view_type">form</field>
243 <field name="context">{"search_default_user_id":uid}</field>
244 <field name="view_id" ref="view_account_analytic_line_tree"/>
247 <!-- Entries by Line -->
249 <record id="action_account_tree1" model="ir.actions.act_window">
250 <field name="name">Analytic Items</field>
251 <field name="res_model">account.analytic.line</field>
252 <field name="view_type">form</field>
253 <field name="view_mode">tree,form</field>
254 <field name="domain">[('account_id','child_of',[active_id])]</field>
255 <field name="context">{'account_id':active_id}</field>
256 <field name="search_view_id" ref="view_account_analytic_line_filter"/>
258 <record id="ir_open_account_analytic_account" model="ir.values">
259 <field eval="'tree_but_open'" name="key2"/>
260 <field eval="'account.analytic.account'" name="model"/>
261 <field name="name">Open Account Tree</field>
262 <field eval="'ir.actions.act_window,%d'%action_account_tree1" name="value"/>
265 <record id="account_analytic_line_extended_form" model="ir.ui.view">
266 <field name="name">account.analytic.line.extended_form</field>
267 <field name="model">account.analytic.line</field>
268 <field name="type">form</field>
269 <field name="arch" type="xml">
270 <form string="Project line">
272 <field name="account_id"/>
273 <field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
274 <field name="journal_id"/>
275 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
276 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
277 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
278 <field invisible="True" name="general_account_id"/>
279 <field name="amount"/>
280 <field name="currency_id" />
281 <field name="amount_currency" />
282 <field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
286 <record id="action_account_analytic_account_line_extended_form" model="ir.actions.act_window">
287 <field name="name">account.analytic.line.extended</field>
288 <field name="type">ir.actions.act_window</field>
289 <field name="res_model">account.analytic.line</field>
290 <field name="view_type">form</field>
291 <field name="view_id" ref="account_analytic_line_extended_form"/>
298 <record id="view_account_analytic_journal_tree" model="ir.ui.view">
299 <field name="name">account.analytic.journal.tree</field>
300 <field name="model">account.analytic.journal</field>
301 <field name="type">tree</field>
302 <field name="arch" type="xml">
303 <tree string="Analytic Journal">
311 <record id="view_analytic_journal_search" model="ir.ui.view">
312 <field name="name">account.analytic.journal.search</field>
313 <field name="model">account.analytic.journal</field>
314 <field name="type">search</field>
315 <field name="arch" type="xml">
316 <search string="Analytic Journals">
323 <group expand="0" string="Group By...">
324 <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
330 <record id="view_account_analytic_journal_form" model="ir.ui.view">
331 <field name="name">account.analytic.journal.form</field>
332 <field name="model">account.analytic.journal</field>
333 <field name="type">form</field>
334 <field name="arch" type="xml">
335 <form string="Analytic Journal">
336 <field name="name" select="1"/>
337 <field name="code" select="1"/>
338 <field name="type" select="2"/>
339 <field name="active" select="2"/>
340 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
344 <record id="action_account_analytic_journal_form" model="ir.actions.act_window">
345 <field name="name">Analytic Journals</field>
346 <field name="res_model">account.analytic.journal</field>
347 <field name="view_type">form</field>
348 <field name="view_mode">tree,form</field>
349 <field name="search_view_id" ref="view_analytic_journal_search" />
351 <menuitem groups="analytic.group_analytic_accounting" action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting" sequence="5"/>
354 # Open journal entries
357 <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
358 <field name="name">Analytic Journal Items</field>
359 <field name="res_model">account.analytic.line</field>
360 <field name="view_type">form</field>
361 <field name="view_mode">tree,form</field>
363 <menuitem groups="analytic.group_analytic_accounting"
364 action="action_account_analytic_journal_open_form"
365 id="account_analytic_journal_entries"
366 parent="menu_finance_entries"/>
372 <record id="action_account_analytic_journal_tree" model="ir.actions.act_window">
373 <field name="name">Print Analytic Journals</field>
374 <field name="res_model">account.analytic.journal</field>
375 <field name="view_type">tree</field>
376 <field name="help">To print an analytics (or costs) journal for a given period. The report give code, move name, account number, general amount and analytic amount.</field>
378 <menuitem groups="analytic.group_analytic_accounting"
379 action="action_account_analytic_journal_tree"
380 id="account_analytic_journal_print" parent="account.next_id_40"/>
386 <record id="report_hr_timesheet_invoice_journal_form" model="ir.ui.view">
387 <field name="name">report.hr.timesheet.invoice.journal.form</field>
388 <field name="model">report.hr.timesheet.invoice.journal</field>
389 <field name="type">form</field>
390 <field name="arch" type="xml">
391 <form string="Analytic Entries Stats">
392 <field name="name" select="1"/>
393 <field name="account_id" select="1"/>
394 <field name="journal_id" select="2"/>
400 <record id="report_hr_timesheet_invoice_journal_tree" model="ir.ui.view">
401 <field name="name">report.hr.timesheet.invoice.journal.tree</field>
402 <field name="model">report.hr.timesheet.invoice.journal</field>
403 <field name="type">tree</field>
404 <field name="arch" type="xml">
405 <tree string="Analytic Entries Stats">
407 <field name="month"/>
408 <field name="account_id"/>
409 <field name="journal_id"/>
410 <field name="quantity"/>
411 <field name="revenue"/>
417 <record id="report_hr_timesheet_invoice_journal_graph" model="ir.ui.view">
418 <field name="name">report.hr.timesheet.invoice.journal.graph</field>
419 <field name="model">report.hr.timesheet.invoice.journal</field>
420 <field name="type">graph</field>
421 <field name="arch" type="xml">
422 <graph string="Analytic Entries Stats" type="bar">
424 <field name="month"/>
425 <field name="cost" operator="+"/>
426 <field name="revenue" operator="+"/>
427 <field group="True" name="journal_id"/>
432 <record id="report_hr_timesheet_invoice_journal_search" model="ir.ui.view">
433 <field name="name">report.hr.timesheet.invoice.journal.search</field>
434 <field name="model">report.hr.timesheet.invoice.journal</field>
435 <field name="type">search</field>
436 <field name="arch" type="xml">
437 <search string="Analytic Entries Stats">
439 <filter icon="terp-go-year" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Sale journal in this year"/>
440 <filter icon="terp-go-month" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Sale journal in this month"/>
441 <separator orientation="vertical"/>
443 <field name="month"/>
444 <field name="account_id"/>
451 context="{'search_default_account_id': [active_id], 'search_default_user_id': False, 'default_account_id': active_id}"
452 id="act_acc_analytic_acc_5_report_hr_timesheet_invoice_journal"
453 name="All Analytic Entries"
454 res_model="account.analytic.line"
455 src_model="account.analytic.account"
456 view_mode="tree,form"
459 <record id="view_account_journal_1" model="ir.ui.view">
460 <field name="name">account.journal.form.1</field>
461 <field name="model">account.journal</field>
462 <field name="inherit_id" ref="account.view_account_journal_form"/>
463 <field name="type">form</field>
464 <field name="arch" type="xml">
465 <field name="currency" position="after">
466 <field name="analytic_journal_id"/>
471 <record id="analytic_accounts_graph" model="ir.ui.view">
472 <field name="name">analytic.accounts.graph</field>
473 <field name="model">account.analytic.account</field>
474 <field name="type">graph</field>
475 <field name="arch" type="xml">
476 <graph string="Analytic Account Statistics" type="bar">
477 <field name="complete_name"/>
478 <field name="balance" operator="+"/>