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"/>
13 <field name="code" groups="base.group_extended"/>
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">
63 <field name="code" groups="base.group_extended"/>
65 <field name="credit"/>
66 <field name="balance"/>
67 <field name="state" invisible="1"/>
68 <field name="currency_id" groups="base.group_extended"/>
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 string="Analytic account">
84 <group colspan="4" col="6">
85 <field name="name" colspan="4"/>
86 <field name="code" groups="base.group_extended"/>
87 <field name="parent_id" on_change="on_change_parent(parent_id)" groups="base.group_extended"/>
88 <field name="company_id" on_change="on_change_company(company_id)" select="2" widget="selection" groups="base.group_multi_company" attrs="{'required': [('type','<>','view')]}"/>
89 <field name="type" select="2"/>
91 <notebook colspan="4">
92 <page string="Account Data">
93 <group colspan="2" col="2">
94 <separator colspan="2" string="Contacts"/>
95 <field name="partner_id" on_change="on_change_partner_id(partner_id)"/>
96 <field name="contact_id"/>
97 <field name="user_id"/>
99 <group colspan="2" col="2" name="contract">
100 <separator colspan="2" string="Contract Data"/>
101 <field name="date_start"/>
103 <field name="quantity_max"/>
106 <page string="Description">
107 <field colspan="4" name="description" nolabel="1"/>
114 <record id="action_account_analytic_account_form" model="ir.actions.act_window">
115 <field name="name">Analytic Accounts</field>
116 <field name="type">ir.actions.act_window</field>
117 <field name="res_model">account.analytic.account</field>
118 <field name="view_type">form</field>
119 <field name="view_mode">tree,graph,form</field>
120 <field name="view_id" ref="view_account_analytic_account_tree"/>
121 <field name="search_view_id" ref="account.view_account_analytic_account_search"/>
123 <menuitem action="action_account_analytic_account_form" id="account_analytic_def_account"
124 parent="menu_analytic_accounting"
125 groups="analytic.group_analytic_accounting"/>
127 <record id="act_account_renew_view" model="ir.actions.act_window">
128 <field name="name">Accounts to Renew</field>
129 <field name="type">ir.actions.act_window</field>
130 <field name="res_model">account.analytic.account</field>
131 <field name="view_type">form</field>
132 <field name="view_mode">tree,form</field>
133 <field name="domain">[('date','<',time.strftime('%Y-%m-%d %H:%M:%S'))]</field>
134 <field name="filter" eval="True"/>
137 <record id="action_account_analytic_account_tree2" model="ir.actions.act_window">
138 <field name="name">Chart of Analytic Accounts</field>
139 <field name="res_model">account.analytic.account</field>
140 <field name="view_type">tree</field>
141 <field name="view_id" ref="view_account_analytic_account_tree"/>
142 <field name="domain">[('parent_id','=',False)]</field>
143 <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>
146 <menuitem groups="analytic.group_analytic_accounting" id="next_id_40"
147 name="Analytic" parent="account.menu_finance_generic_reporting"
150 <record id="view_account_analytic_line_form" model="ir.ui.view">
151 <field name="name">account.analytic.line.form</field>
152 <field name="model">account.analytic.line</field>
153 <field name="type">form</field>
154 <field name="arch" type="xml">
155 <form string="Analytic Entry">
156 <group colspan="4" col="6">
159 <field name="account_id"/>
160 <field name="journal_id"/>
162 <field name="company_id" groups="base.group_multi_company"/>
164 <group colspan="2" col="4">
165 <separator string="Amount" colspan="4"/>
166 <field name="amount" colspan="4"/>
167 <field name="amount_currency" colspan="2"/>
168 <field name="currency_id" colspan="2" nolabel="1"/>
170 <group colspan="2" col="4">
171 <separator string="Product Information" colspan="4"/>
172 <field name="product_id" colspan="4"/>
173 <field name="unit_amount" colspan="2"/>
174 <field name="product_uom_id" colspan="2" nolabel="1"/>
176 <group colspan="2" col="2" groups="base.group_extended">
177 <separator string="General Accounting" colspan="2"/>
178 <field name="general_account_id"/>
179 <field name="move_id" readonly="1"/>
184 <record id="view_account_analytic_line_tree" model="ir.ui.view">
185 <field name="name">account.analytic.line.tree</field>
186 <field name="model">account.analytic.line</field>
187 <field name="type">tree</field>
188 <field name="arch" type="xml">
189 <tree editable="top" string="Analytic Entries">
191 <field name="ref" invisible="context.get('to_invoice', False)"/>
193 <field name="journal_id" invisible="context.get('to_invoice', False)"/>
194 <field name="amount" sum="Total" invisible="context.get('to_invoice', False)"/>
195 <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)"/>
196 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total Quantity"/>
197 <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)"/>
198 <field domain="[('type','=','normal')]" name="account_id"/>
199 <field name="general_account_id" invisible="context.get('to_invoice', False)"/>
200 <field name="user_id" invisible="1" />
204 <record id="view_account_analytic_line_filter" model="ir.ui.view">
205 <field name="name">account.analytic.line.select</field>
206 <field name="model">account.analytic.line</field>
207 <field name="type">search</field>
208 <field name="arch" type="xml">
209 <search string="Search Analytic Lines">
211 <filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" icon="terp-camera_test" help="Analytic Journal Items related to a sale journal."/>
212 <filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" icon="terp-purchase" help="Analytic Journal Items related to a purchase journal."/>
213 <filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation'))]" icon="terp-folder-orange"/>
214 <separator orientation="vertical"/>
217 <field name="account_id"/>
218 <field name="user_id">
219 <filter string="My Entries" domain="[('user_id','=',uid)]" icon="terp-personal"/>
223 <group string="Group By..." expand="0">
224 <filter string="Account" context="{'group_by':'account_id'}" groups="base.group_extended" icon="terp-folder-green"/>
225 <filter string="Journal" context="{'group_by':'journal_id'}" icon="terp-folder-orange"/>
226 <filter string="User" context="{'group_by':'user_id'}" icon="terp-personal"/>
227 <separator orientation="vertical"/>
228 <filter string="Fin.Account" context="{'group_by':'general_account_id'}" icon="terp-folder-green"/>
229 <separator orientation="vertical"/>
230 <filter string="Product" context="{'group_by':'product_id'}" icon="terp-accessories-archiver"/>
235 <record id="action_account_analytic_line_form" model="ir.actions.act_window">
236 <field name="name">Analytic Entries</field>
237 <field name="type">ir.actions.act_window</field>
238 <field name="res_model">account.analytic.line</field>
239 <field name="view_type">form</field>
240 <field name="context">{"search_default_user_id":uid}</field>
241 <field name="view_id" ref="view_account_analytic_line_tree"/>
244 <!-- Entries by Line -->
246 <record id="action_account_tree1" model="ir.actions.act_window">
247 <field name="name">Analytic Items</field>
248 <field name="res_model">account.analytic.line</field>
249 <field name="view_type">form</field>
250 <field name="view_mode">tree,form</field>
251 <field name="domain">[('account_id','child_of',[active_id])]</field>
252 <field name="context">{'account_id':active_id}</field>
253 <field name="search_view_id" ref="view_account_analytic_line_filter"/>
255 <record id="ir_open_account_analytic_account" model="ir.values">
256 <field eval="'tree_but_open'" name="key2"/>
257 <field eval="'account.analytic.account'" name="model"/>
258 <field name="name">Open Account Tree</field>
259 <field eval="'ir.actions.act_window,%d'%action_account_tree1" name="value"/>
262 <record id="account_analytic_line_extended_form" model="ir.ui.view">
263 <field name="name">account.analytic.line.extended_form</field>
264 <field name="model">account.analytic.line</field>
265 <field name="type">form</field>
266 <field name="arch" type="xml">
267 <form string="Project line">
269 <field name="account_id" groups="base.group_extended"/>
270 <field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
271 <field name="journal_id"/>
272 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
273 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
274 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
275 <field invisible="True" name="general_account_id"/>
276 <field name="amount"/>
277 <field name="currency_id" />
278 <field name="amount_currency" />
279 <field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
283 <record id="action_account_analytic_account_line_extended_form" model="ir.actions.act_window">
284 <field name="name">account.analytic.line.extended</field>
285 <field name="type">ir.actions.act_window</field>
286 <field name="res_model">account.analytic.line</field>
287 <field name="view_type">form</field>
288 <field name="view_id" ref="account_analytic_line_extended_form"/>
295 <record id="view_account_analytic_journal_tree" model="ir.ui.view">
296 <field name="name">account.analytic.journal.tree</field>
297 <field name="model">account.analytic.journal</field>
298 <field name="type">tree</field>
299 <field name="arch" type="xml">
300 <tree string="Analytic Journal">
308 <record id="view_analytic_journal_search" model="ir.ui.view">
309 <field name="name">account.analytic.journal.search</field>
310 <field name="model">account.analytic.journal</field>
311 <field name="type">search</field>
312 <field name="arch" type="xml">
313 <search string="Analytic Journals">
320 <group expand="0" string="Group By...">
321 <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
327 <record id="view_account_analytic_journal_form" model="ir.ui.view">
328 <field name="name">account.analytic.journal.form</field>
329 <field name="model">account.analytic.journal</field>
330 <field name="type">form</field>
331 <field name="arch" type="xml">
332 <form string="Analytic Journal">
333 <field name="name" select="1"/>
334 <field name="code" select="1"/>
335 <field name="type" select="2"/>
336 <field name="active" select="2"/>
337 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
341 <record id="action_account_analytic_journal_form" model="ir.actions.act_window">
342 <field name="name">Analytic Journals</field>
343 <field name="res_model">account.analytic.journal</field>
344 <field name="view_type">form</field>
345 <field name="view_mode">tree,form</field>
346 <field name="search_view_id" ref="view_analytic_journal_search" />
348 <menuitem groups="analytic.group_analytic_accounting" action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting" sequence="5"/>
351 # Open journal entries
354 <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
355 <field name="name">Analytic Journal Items</field>
356 <field name="res_model">account.analytic.line</field>
357 <field name="view_type">form</field>
358 <field name="view_mode">tree,form</field>
360 <menuitem groups="analytic.group_analytic_accounting"
361 action="action_account_analytic_journal_open_form"
362 id="account_analytic_journal_entries"
363 parent="menu_finance_entries"/>
369 <record id="action_account_analytic_journal_tree" model="ir.actions.act_window">
370 <field name="name">Print Analytic Journals</field>
371 <field name="res_model">account.analytic.journal</field>
372 <field name="view_type">tree</field>
373 <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>
375 <menuitem groups="analytic.group_analytic_accounting"
376 action="action_account_analytic_journal_tree"
377 id="account_analytic_journal_print" parent="account.next_id_40"/>
383 <record id="report_hr_timesheet_invoice_journal_form" model="ir.ui.view">
384 <field name="name">report.hr.timesheet.invoice.journal.form</field>
385 <field name="model">report.hr.timesheet.invoice.journal</field>
386 <field name="type">form</field>
387 <field name="arch" type="xml">
388 <form string="Analytic Entries Stats">
389 <field name="name" select="1"/>
390 <field name="account_id" select="1"/>
391 <field name="journal_id" select="2"/>
397 <record id="report_hr_timesheet_invoice_journal_tree" model="ir.ui.view">
398 <field name="name">report.hr.timesheet.invoice.journal.tree</field>
399 <field name="model">report.hr.timesheet.invoice.journal</field>
400 <field name="type">tree</field>
401 <field name="arch" type="xml">
402 <tree string="Analytic Entries Stats">
404 <field name="month"/>
405 <field name="account_id"/>
406 <field name="journal_id"/>
407 <field name="quantity"/>
408 <field name="revenue"/>
414 <record id="report_hr_timesheet_invoice_journal_graph" model="ir.ui.view">
415 <field name="name">report.hr.timesheet.invoice.journal.graph</field>
416 <field name="model">report.hr.timesheet.invoice.journal</field>
417 <field name="type">graph</field>
418 <field name="arch" type="xml">
419 <graph string="Analytic Entries Stats" type="bar">
421 <field name="month"/>
422 <field name="cost" operator="+"/>
423 <field name="revenue" operator="+"/>
424 <field group="True" name="journal_id"/>
429 <record id="report_hr_timesheet_invoice_journal_search" model="ir.ui.view">
430 <field name="name">report.hr.timesheet.invoice.journal.search</field>
431 <field name="model">report.hr.timesheet.invoice.journal</field>
432 <field name="type">search</field>
433 <field name="arch" type="xml">
434 <search string="Analytic Entries Stats">
436 <filter icon="terp-go-year" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Sale journal in this year"/>
437 <filter icon="terp-go-month" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Sale journal in this month"/>
438 <separator orientation="vertical"/>
440 <field name="month"/>
441 <field name="account_id"/>
448 context="{'search_default_account_id': [active_id], 'search_default_user_id': False, 'default_account_id': active_id}"
449 id="act_acc_analytic_acc_5_report_hr_timesheet_invoice_journal"
450 name="All Analytic Entries"
451 res_model="account.analytic.line"
452 src_model="account.analytic.account"
453 view_mode="tree,form"
456 <record id="view_account_journal_1" model="ir.ui.view">
457 <field name="name">account.journal.form.1</field>
458 <field name="model">account.journal</field>
459 <field name="inherit_id" ref="account.view_account_journal_form"/>
460 <field name="type">form</field>
461 <field name="arch" type="xml">
462 <field name="currency" position="after">
463 <field name="analytic_journal_id"/>
468 <record id="analytic_accounts_graph" model="ir.ui.view">
469 <field name="name">analytic.accounts.graph</field>
470 <field name="model">account.analytic.account</field>
471 <field name="type">graph</field>
472 <field name="arch" type="xml">
473 <graph string="Analytic Account Statistics" type="bar">
474 <field name="complete_name"/>
475 <field name="balance" operator="+"/>