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 eval="8" name="priority"/>
9 <field name="arch" type="xml">
10 <tree toolbar="1" colors="red:state=='pending';grey:state in ('cancelled','close');blue:type=='view'" string="Analytic Accounts">
11 <field name="complete_name"/>
12 <field name="partner_id"/>
14 <field name="date_start"/>
16 <field name="user_id" invisible="1"/>
17 <field name="manager_id"/>
18 <field name="parent_id" invisible="1"/>
19 <field name="state" invisible="1"/>
20 <field name="type" invisible="1"/>
21 <field name="template_id" invisible="1"/>
22 <field name="company_id" groups="base.group_multi_company"/>
27 <record id="view_account_analytic_account_search" model="ir.ui.view">
28 <field name="name">account.analytic.account.search</field>
29 <field name="model">account.analytic.account</field>
30 <field name="arch" type="xml">
31 <search string="Analytic Account">
32 <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Account"/>
34 <field name="partner_id" operator="child_of"/>
35 <field name="manager_id"/>
36 <field name="parent_id"/>
37 <field name="user_id"/>
38 <filter string="Open" domain="[('state','=','open')]" help="Current Accounts"/>
39 <filter string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
40 <group expand="0" string="Group By">
41 <filter string="Associated Partner" domain="[]" context="{'group_by':'partner_id'}"/>
42 <filter string="Type" domain="[]" context="{'group_by':'type'}"/>
43 <filter string="Template" domain="[]" context="{'group_by':'template_id'}"/>
44 <filter string="Parent Account" domain="[]" context="{'group_by':'parent_id'}"/>
45 <filter string="Status" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/>
51 <record id="view_account_analytic_account_tree" model="ir.ui.view">
52 <field name="name">account.analytic.account.tree</field>
53 <field name="model">account.analytic.account</field>
54 <field name="field_parent">child_complete_ids</field>
55 <field name="arch" type="xml">
56 <tree colors="blue:state=='pending';grey:state in ('close','cancelled');blue:type=='view'" string="Analytic account" toolbar="1">
57 <field name="name" invisible="1"/>
58 <field name="complete_name"/>
61 <field name="credit"/>
62 <field name="balance"/>
63 <field name="state" invisible="1"/>
64 <field name="currency_id" groups="base.group_multi_currency"/>
65 <field name="date" invisible="1"/>
66 <field name="user_id" invisible="1"/>
67 <field name="partner_id" invisible="1"/>
68 <field name="parent_id" invisible="1"/>
70 <field name="company_id" groups="base.group_multi_company"/>
71 <field name="template_id" invisible="1"/>
77 <record id="action_account_analytic_account_form" model="ir.actions.act_window">
78 <field name="name">Analytic Accounts</field>
79 <field name="type">ir.actions.act_window</field>
80 <field name="res_model">account.analytic.account</field>
81 <field name="context">{}</field> <!-- repair invalid context by setting empty one -->
82 <field name="view_type">form</field>
83 <field name="view_mode">tree,form</field>
84 <field name="view_id" ref="view_account_analytic_account_tree"/>
85 <field name="search_view_id" ref="account.view_account_analytic_account_search"/>
87 <menuitem action="action_account_analytic_account_form" id="account_analytic_def_account"
88 parent="menu_analytic_accounting"
89 groups="analytic.group_analytic_accounting"/>
91 <record id="act_account_renew_view" model="ir.actions.act_window">
92 <field name="name">Accounts to Renew</field>
93 <field name="type">ir.actions.act_window</field>
94 <field name="res_model">account.analytic.account</field>
95 <field name="view_type">form</field>
96 <field name="view_mode">tree,form</field>
97 <field name="domain">[('date','<',time.strftime('%Y-%m-%d %H:%M:%S'))]</field>
98 <field name="filter" eval="True"/>
101 <record id="action_account_analytic_account_tree2" model="ir.actions.act_window">
102 <field name="name">Chart of Analytic Accounts</field>
103 <field name="res_model">account.analytic.account</field>
104 <field name="view_type">tree</field>
105 <field name="view_id" ref="view_account_analytic_account_tree"/>
106 <field name="domain">[('parent_id','=',False)]</field>
107 <field name="help" type="html">
109 Click to add a new analytic account.
111 The normal chart of accounts has a structure defined by the
112 legal requirement of the country. The analytic chart of
113 accounts structure should reflect your own business needs in
114 term of costs/revenues reporting.
116 They are usually structured by contracts, projects, products or
117 departements. Most of the Odoo operations (invoices,
118 timesheets, expenses, etc) generate analytic entries on the
125 <record id="view_account_analytic_line_form" model="ir.ui.view">
126 <field name="name">account.analytic.line.form</field>
127 <field name="model">account.analytic.line</field>
128 <field name="priority">1</field>
129 <field name="arch" type="xml">
130 <form string="Analytic Entry">
134 <field name="account_id"/>
135 <field name="journal_id"/>
136 <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice']}"/>
141 <field name="company_id" groups="base.group_multi_company"/>
143 <group string="Amount">
144 <field name="amount"/>
145 <label for="amount_currency" groups="base.group_multi_currency"/>
146 <div groups="base.group_multi_currency">
147 <field name="amount_currency" class="oe_inline"/>
148 <field name="currency_id" class="oe_inline"/>
151 <group string="Product Information">
152 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
153 <label for="unit_amount"/>
155 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
156 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
159 <group string="General Accounting">
160 <field name="general_account_id"/>
161 <field name="move_id" readonly="1"/>
167 <record id="view_account_analytic_line_tree" model="ir.ui.view">
168 <field name="name">account.analytic.line.tree</field>
169 <field name="model">account.analytic.line</field>
170 <field name="arch" type="xml">
171 <tree string="Analytic Entries">
173 <field name="ref" invisible="context.get('to_invoice', False)"/>
175 <field name="user_id"/>
176 <field name="journal_id" invisible="context.get('to_invoice', False)"/>
177 <field name="amount" sum="Total" invisible="context.get('to_invoice', False)"/>
178 <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)"/>
179 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total Quantity"/>
180 <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)"/>
181 <field domain="[('type','=','normal')]" name="account_id"/>
182 <field name="general_account_id" invisible="context.get('to_invoice', False)"/>
183 <field name="company_id" groups="base.group_multi_company"/>
187 <record id="view_account_analytic_line_filter" model="ir.ui.view">
188 <field name="name">account.analytic.line.select</field>
189 <field name="model">account.analytic.line</field>
190 <field name="arch" type="xml">
191 <search string="Search Analytic Lines">
192 <field name="name" string="Analytic Line"/>
194 <filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" help="Analytic Journal Items related to a sale journal."/>
195 <filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" help="Analytic Journal Items related to a purchase journal."/>
196 <filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation'))]"/>
198 <filter string="My Entries" domain="[('user_id','=',uid)]"/>
199 <field name="account_id"/>
200 <field name="user_id"/>
201 <group string="Group By" expand="0">
202 <filter string="Analytic Account" context="{'group_by':'account_id'}"/>
203 <filter string="Fin. Account" context="{'group_by':'general_account_id'}"/>
204 <filter string="Journal" context="{'group_by':'journal_id'}" name="group_journal"/>
206 <filter string="Product" context="{'group_by':'product_id'}"/>
207 <filter string="User" context="{'group_by':'user_id'}"/>
209 <filter string="Tasks Month" context="{'group_by':'date'}" name="group_date" help="Invoice Tasks by Month"/>
215 <record id="action_account_analytic_line_form" model="ir.actions.act_window">
216 <field name="name">Analytic Entries</field>
217 <field name="type">ir.actions.act_window</field>
218 <field name="res_model">account.analytic.line</field>
219 <field name="view_type">form</field>
220 <field name="context">{"search_default_user_id":uid}</field>
221 <field name="view_id" ref="view_account_analytic_line_tree"/>
224 <!-- Entries by Line -->
226 <record id="action_account_tree1" model="ir.actions.act_window">
227 <field name="name">Analytic Items</field>
228 <field name="res_model">account.analytic.line</field>
229 <field name="view_type">form</field>
230 <field name="view_mode">tree,form</field>
231 <field name="domain">[('account_id','child_of',[active_id])]</field>
232 <field name="context">{'account_id':active_id}</field>
233 <field name="search_view_id" ref="view_account_analytic_line_filter"/>
235 <record id="ir_open_account_analytic_account" model="ir.values">
236 <field eval="'tree_but_open'" name="key2"/>
237 <field eval="'account.analytic.account'" name="model"/>
238 <field name="name">Open Account Tree</field>
239 <field eval="'ir.actions.act_window,%d'%action_account_tree1" name="value"/>
242 <record id="account_analytic_line_extended_form" model="ir.ui.view">
243 <field name="name">account.analytic.line.extended_form</field>
244 <field name="model">account.analytic.line</field>
245 <field name="arch" type="xml">
246 <form string="Project line">
250 <field name="account_id"/>
251 <field name="journal_id"/>
254 <field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
255 <field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
257 <group string="Amount">
258 <field name="amount"/>
259 <label for="amount_currency" groups="base.group_multi_currency"/>
260 <div groups="base.group_multi_currency">
261 <field name="amount_currency" class="oe_inline"/>
262 <field name="currency_id" class="oe_inline"/>
264 <field invisible="1" name="general_account_id"/>
266 <group string="Product Information">
267 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
268 <label for="unit_amount"/>
270 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
271 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
278 <record id="action_account_analytic_account_line_extended_form" model="ir.actions.act_window">
279 <field name="name">account.analytic.line.extended</field>
280 <field name="type">ir.actions.act_window</field>
281 <field name="res_model">account.analytic.line</field>
282 <field name="view_type">form</field>
283 <field name="view_id" ref="account_analytic_line_extended_form"/>
290 <record id="view_account_analytic_journal_tree" model="ir.ui.view">
291 <field name="name">account.analytic.journal.tree</field>
292 <field name="model">account.analytic.journal</field>
293 <field name="arch" type="xml">
294 <tree string="Analytic Journal">
302 <record id="view_analytic_journal_search" model="ir.ui.view">
303 <field name="name">account.analytic.journal.search</field>
304 <field name="model">account.analytic.journal</field>
305 <field name="arch" type="xml">
306 <search string="Analytic Journals">
307 <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Journal"/>
309 <group expand="0" string="Group By">
310 <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
316 <record id="view_account_analytic_journal_form" model="ir.ui.view">
317 <field name="name">account.analytic.journal.form</field>
318 <field name="model">account.analytic.journal</field>
319 <field name="arch" type="xml">
320 <form string="Analytic Journal">
325 <field name="active"/>
326 <field name="company_id" groups="base.group_multi_company"/>
331 <record id="action_account_analytic_journal_form" model="ir.actions.act_window">
332 <field name="name">Analytic Journals</field>
333 <field name="res_model">account.analytic.journal</field>
334 <field name="view_type">form</field>
335 <field name="view_mode">tree,form</field>
336 <field name="search_view_id" ref="view_analytic_journal_search" />
338 <menuitem groups="analytic.group_analytic_accounting" action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting" sequence="5"/>
341 # Open journal entries
344 <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
345 <field name="name">Analytic Journal Items</field>
346 <field name="res_model">account.analytic.line</field>
347 <field name="view_type">form</field>
348 <field name="view_mode">tree,form</field>
350 <menuitem groups="analytic.group_analytic_accounting"
351 action="action_account_analytic_journal_open_form"
352 id="account_analytic_journal_entries"
353 parent="menu_finance_entries"/>
360 <record id="view_account_journal_1" model="ir.ui.view">
361 <field name="name">account.journal.form.1</field>
362 <field name="model">account.journal</field>
363 <field name="inherit_id" ref="account.view_account_journal_form"/>
364 <field name="arch" type="xml">
365 <field name="type" position="after">
366 <field name="analytic_journal_id" groups="analytic.group_analytic_accounting"/>