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" filter_domain="[('partner_id','child_of',self)]"/>
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="view_type">form</field>
82 <field name="view_mode">tree,form</field>
83 <field name="view_id" ref="view_account_analytic_account_tree"/>
84 <field name="search_view_id" ref="account.view_account_analytic_account_search"/>
86 <menuitem action="action_account_analytic_account_form" id="account_analytic_def_account"
87 parent="menu_analytic_accounting"
88 groups="analytic.group_analytic_accounting"/>
90 <record id="act_account_renew_view" model="ir.actions.act_window">
91 <field name="name">Accounts to Renew</field>
92 <field name="type">ir.actions.act_window</field>
93 <field name="res_model">account.analytic.account</field>
94 <field name="view_type">form</field>
95 <field name="view_mode">tree,form</field>
96 <field name="domain">[('date','<',time.strftime('%Y-%m-%d %H:%M:%S'))]</field>
97 <field name="filter" eval="True"/>
100 <record id="action_account_analytic_account_tree2" model="ir.actions.act_window">
101 <field name="name">Chart of Analytic Accounts</field>
102 <field name="res_model">account.analytic.account</field>
103 <field name="view_type">tree</field>
104 <field name="view_id" ref="view_account_analytic_account_tree"/>
105 <field name="domain">[('parent_id','=',False)]</field>
106 <field name="help" type="html">
108 Click to add a new analytic account.
110 The normal chart of accounts has a structure defined by the
111 legal requirement of the country. The analytic chart of
112 accounts structure should reflect your own business needs in
113 term of costs/revenues reporting.
115 They are usually structured by contracts, projects, products or
116 departements. Most of the OpenERP operations (invoices,
117 timesheets, expenses, etc) generate analytic entries on the
124 <record id="view_account_analytic_line_form" model="ir.ui.view">
125 <field name="name">account.analytic.line.form</field>
126 <field name="model">account.analytic.line</field>
127 <field name="priority">1</field>
128 <field name="arch" type="xml">
129 <form string="Analytic Entry" version="7.0">
133 <field name="account_id"/>
134 <field name="journal_id"/>
135 <field name="user_id"/>
140 <field name="company_id" groups="base.group_multi_company"/>
142 <group string="Amount">
143 <field name="amount"/>
144 <label for="amount_currency" groups="base.group_multi_currency"/>
145 <div groups="base.group_multi_currency">
146 <field name="amount_currency" class="oe_inline"/>
147 <field name="currency_id" class="oe_inline"/>
150 <group string="Product Information">
151 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
152 <label for="unit_amount"/>
154 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
155 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
158 <group string="General Accounting">
159 <field name="general_account_id"/>
160 <field name="move_id" readonly="1"/>
166 <record id="view_account_analytic_line_tree" model="ir.ui.view">
167 <field name="name">account.analytic.line.tree</field>
168 <field name="model">account.analytic.line</field>
169 <field name="arch" type="xml">
170 <tree string="Analytic Entries">
172 <field name="ref" invisible="context.get('to_invoice', False)"/>
174 <field name="user_id"/>
175 <field name="journal_id" invisible="context.get('to_invoice', False)"/>
176 <field name="amount" sum="Total" invisible="context.get('to_invoice', False)"/>
177 <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)"/>
178 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total Quantity"/>
179 <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)"/>
180 <field domain="[('type','=','normal')]" name="account_id"/>
181 <field name="general_account_id" invisible="context.get('to_invoice', False)"/>
182 <field name="company_id" groups="base.group_multi_company"/>
186 <record id="view_account_analytic_line_filter" model="ir.ui.view">
187 <field name="name">account.analytic.line.select</field>
188 <field name="model">account.analytic.line</field>
189 <field name="arch" type="xml">
190 <search string="Search Analytic Lines">
191 <field name="name" string="Analytic Line"/>
193 <filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" help="Analytic Journal Items related to a sale journal."/>
194 <filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" help="Analytic Journal Items related to a purchase journal."/>
195 <filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation'))]"/>
197 <filter string="My Entries" domain="[('user_id','=',uid)]"/>
198 <field name="account_id"/>
199 <field name="user_id"/>
200 <group string="Group By..." expand="0">
201 <filter string="Analytic Account" context="{'group_by':'account_id'}"/>
202 <filter string="Fin. Account" context="{'group_by':'general_account_id'}"/>
203 <filter string="Journal" context="{'group_by':'journal_id'}" name="group_journal"/>
205 <filter string="Product" context="{'group_by':'product_id'}"/>
206 <filter string="User" context="{'group_by':'user_id'}"/>
208 <filter string="Date" context="{'group_by':'date'}" name="group_date"/>
214 <record id="action_account_analytic_line_form" model="ir.actions.act_window">
215 <field name="name">Analytic Entries</field>
216 <field name="type">ir.actions.act_window</field>
217 <field name="res_model">account.analytic.line</field>
218 <field name="view_type">form</field>
219 <field name="context">{"search_default_user_id":uid}</field>
220 <field name="view_id" ref="view_account_analytic_line_tree"/>
223 <!-- Entries by Line -->
225 <record id="action_account_tree1" model="ir.actions.act_window">
226 <field name="name">Analytic Items</field>
227 <field name="res_model">account.analytic.line</field>
228 <field name="view_type">form</field>
229 <field name="view_mode">tree,form</field>
230 <field name="domain">[('account_id','child_of',[active_id])]</field>
231 <field name="context">{'account_id':active_id}</field>
232 <field name="search_view_id" ref="view_account_analytic_line_filter"/>
234 <record id="ir_open_account_analytic_account" model="ir.values">
235 <field eval="'tree_but_open'" name="key2"/>
236 <field eval="'account.analytic.account'" name="model"/>
237 <field name="name">Open Account Tree</field>
238 <field eval="'ir.actions.act_window,%d'%action_account_tree1" name="value"/>
241 <record id="account_analytic_line_extended_form" model="ir.ui.view">
242 <field name="name">account.analytic.line.extended_form</field>
243 <field name="model">account.analytic.line</field>
244 <field name="arch" type="xml">
245 <form string="Project line" version="7.0">
249 <field name="account_id"/>
250 <field name="journal_id"/>
253 <field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
254 <field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
256 <group string="Amount">
257 <field name="amount"/>
258 <label for="amount_currency" groups="base.group_multi_currency"/>
259 <div groups="base.group_multi_currency">
260 <field name="amount_currency" class="oe_inline"/>
261 <field name="currency_id" class="oe_inline"/>
263 <field invisible="1" name="general_account_id"/>
265 <group string="Product Information">
266 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
267 <label for="unit_amount"/>
269 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
270 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
277 <record id="action_account_analytic_account_line_extended_form" model="ir.actions.act_window">
278 <field name="name">account.analytic.line.extended</field>
279 <field name="type">ir.actions.act_window</field>
280 <field name="res_model">account.analytic.line</field>
281 <field name="view_type">form</field>
282 <field name="view_id" ref="account_analytic_line_extended_form"/>
289 <record id="view_account_analytic_journal_tree" model="ir.ui.view">
290 <field name="name">account.analytic.journal.tree</field>
291 <field name="model">account.analytic.journal</field>
292 <field name="arch" type="xml">
293 <tree string="Analytic Journal">
301 <record id="view_analytic_journal_search" model="ir.ui.view">
302 <field name="name">account.analytic.journal.search</field>
303 <field name="model">account.analytic.journal</field>
304 <field name="arch" type="xml">
305 <search string="Analytic Journals">
306 <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Journal"/>
308 <group expand="0" string="Group By...">
309 <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
315 <record id="view_account_analytic_journal_form" model="ir.ui.view">
316 <field name="name">account.analytic.journal.form</field>
317 <field name="model">account.analytic.journal</field>
318 <field name="arch" type="xml">
319 <form string="Analytic Journal" version="7.0">
324 <field name="active"/>
325 <field name="company_id" groups="base.group_multi_company"/>
330 <record id="action_account_analytic_journal_form" model="ir.actions.act_window">
331 <field name="name">Analytic Journals</field>
332 <field name="res_model">account.analytic.journal</field>
333 <field name="view_type">form</field>
334 <field name="view_mode">tree,form</field>
335 <field name="search_view_id" ref="view_analytic_journal_search" />
337 <menuitem groups="analytic.group_analytic_accounting" action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting" sequence="5"/>
340 # Open journal entries
343 <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
344 <field name="name">Analytic Journal Items</field>
345 <field name="res_model">account.analytic.line</field>
346 <field name="view_type">form</field>
347 <field name="view_mode">tree,form</field>
349 <menuitem groups="analytic.group_analytic_accounting"
350 action="action_account_analytic_journal_open_form"
351 id="account_analytic_journal_entries"
352 parent="menu_finance_entries"/>
359 <record id="view_account_journal_1" model="ir.ui.view">
360 <field name="name">account.journal.form.1</field>
361 <field name="model">account.journal</field>
362 <field name="inherit_id" ref="account.view_account_journal_form"/>
363 <field name="arch" type="xml">
364 <field name="type" position="after">
365 <field name="analytic_journal_id" groups="analytic.group_analytic_accounting"/>