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"/>
13 <field name="quantity"/>
15 <field name="date_start" invisible="1"/>
16 <field name="user_id" invisible="1"/>
17 <field name="parent_id" invisible="1"/>
18 <field name="partner_id" invisible="1"/>
19 <field name="state" invisible="1"/>
20 <field name="type" invisible="1"/>
21 <field name="company_id" groups="base.group_multi_company"/>
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="arch" type="xml">
30 <search string="Analytic Account">
31 <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" 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 <field name="partner_id"/>
36 <field name="user_id"/>
37 <group expand="0" string="Group By...">
38 <filter string="Associated Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
39 <filter string="Parent Account" icon="terp-folder-green" domain="[]" context="{'group_by':'parent_id'}"/>
40 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/>
46 <record id="view_account_analytic_account_tree" model="ir.ui.view">
47 <field name="name">account.analytic.account.tree</field>
48 <field name="model">account.analytic.account</field>
49 <field name="field_parent">child_complete_ids</field>
50 <field name="arch" type="xml">
51 <tree colors="blue:state=='pending';grey:state in ('close','cancelled');blue:type=='view'" string="Analytic account" toolbar="1">
52 <field name="complete_name"/>
55 <field name="credit"/>
56 <field name="balance"/>
57 <field name="state" invisible="1"/>
58 <field name="currency_id" groups="base.group_multi_currency"/>
59 <field name="date" invisible="1"/>
60 <field name="user_id" invisible="1"/>
61 <field name="partner_id" invisible="1"/>
62 <field name="parent_id" invisible="1"/>
64 <field name="company_id" groups="base.group_multi_company"/>
70 <record id="action_account_analytic_account_form" model="ir.actions.act_window">
71 <field name="name">Analytic Accounts</field>
72 <field name="type">ir.actions.act_window</field>
73 <field name="res_model">account.analytic.account</field>
74 <field name="view_type">form</field>
75 <field name="view_mode">tree,form</field>
76 <field name="view_id" ref="view_account_analytic_account_tree"/>
77 <field name="search_view_id" ref="account.view_account_analytic_account_search"/>
79 <menuitem action="action_account_analytic_account_form" id="account_analytic_def_account"
80 parent="menu_analytic_accounting"
81 groups="analytic.group_analytic_accounting"/>
83 <record id="act_account_renew_view" model="ir.actions.act_window">
84 <field name="name">Accounts to Renew</field>
85 <field name="type">ir.actions.act_window</field>
86 <field name="res_model">account.analytic.account</field>
87 <field name="view_type">form</field>
88 <field name="view_mode">tree,form</field>
89 <field name="domain">[('date','<',time.strftime('%Y-%m-%d %H:%M:%S'))]</field>
90 <field name="filter" eval="True"/>
93 <record id="action_account_analytic_account_tree2" model="ir.actions.act_window">
94 <field name="name">Chart of Analytic Accounts</field>
95 <field name="res_model">account.analytic.account</field>
96 <field name="view_type">tree</field>
97 <field name="view_id" ref="view_account_analytic_account_tree"/>
98 <field name="domain">[('parent_id','=',False)]</field>
99 <field name="help" type="html">
101 Click to add a new analytic account.
103 The normal chart of accounts has a structure defined by the
104 legal requirement of the country. The analytic chart of
105 accounts structure should reflect your own business needs in
106 term of costs/revenues reporting.
108 They are usually structured by contracts, projects, products or
109 departements. Most of the OpenERP operations (invoices,
110 timesheets, expenses, etc) generate analytic entries on the
117 <record id="view_account_analytic_line_form" model="ir.ui.view">
118 <field name="name">account.analytic.line.form</field>
119 <field name="model">account.analytic.line</field>
120 <field name="priority">1</field>
121 <field name="arch" type="xml">
122 <form string="Analytic Entry" version="7.0">
126 <field name="account_id"/>
127 <field name="journal_id"/>
132 <field name="company_id" groups="base.group_multi_company"/>
134 <group string="Amount">
135 <field name="amount"/>
136 <label for="amount_currency" groups="base.group_multi_currency"/>
137 <div groups="base.group_multi_currency">
138 <field name="amount_currency" class="oe_inline"/>
139 <field name="currency_id" class="oe_inline"/>
142 <group string="Product Information">
143 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
144 <label for="unit_amount"/>
146 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
147 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
150 <group string="General Accounting">
151 <field name="general_account_id"/>
152 <field name="move_id" readonly="1"/>
158 <record id="view_account_analytic_line_tree" model="ir.ui.view">
159 <field name="name">account.analytic.line.tree</field>
160 <field name="model">account.analytic.line</field>
161 <field name="arch" type="xml">
162 <tree string="Analytic Entries">
164 <field name="ref" invisible="context.get('to_invoice', False)"/>
166 <field name="journal_id" invisible="context.get('to_invoice', False)"/>
167 <field name="amount" sum="Total" invisible="context.get('to_invoice', False)"/>
168 <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)"/>
169 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total Quantity"/>
170 <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)"/>
171 <field domain="[('type','=','normal')]" name="account_id"/>
172 <field name="general_account_id" invisible="context.get('to_invoice', False)"/>
173 <field name="user_id" invisible="1" />
174 <field name="company_id" groups="base.group_multi_company"/>
178 <record id="view_account_analytic_line_filter" model="ir.ui.view">
179 <field name="name">account.analytic.line.select</field>
180 <field name="model">account.analytic.line</field>
181 <field name="arch" type="xml">
182 <search string="Search Analytic Lines">
183 <field name="name" string="Analytic Line"/>
185 <filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" help="Analytic Journal Items related to a sale journal."/>
186 <filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" help="Analytic Journal Items related to a purchase journal."/>
187 <filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation'))]"/>
189 <filter string="My Entries" domain="[('user_id','=',uid)]"/>
190 <field name="account_id"/>
191 <field name="user_id"/>
192 <group string="Group By..." expand="0">
193 <filter string="Analytic Account" context="{'group_by':'account_id'}"/>
194 <filter string="Fin. Account" context="{'group_by':'general_account_id'}"/>
195 <filter string="Journal" context="{'group_by':'journal_id'}" name="group_journal"/>
197 <filter string="Product" context="{'group_by':'product_id'}"/>
198 <filter string="User" context="{'group_by':'user_id'}"/>
200 <filter string="Date" context="{'group_by':'date'}" name="group_date"/>
206 <record id="action_account_analytic_line_form" model="ir.actions.act_window">
207 <field name="name">Analytic Entries</field>
208 <field name="type">ir.actions.act_window</field>
209 <field name="res_model">account.analytic.line</field>
210 <field name="view_type">form</field>
211 <field name="context">{"search_default_user_id":uid}</field>
212 <field name="view_id" ref="view_account_analytic_line_tree"/>
215 <!-- Entries by Line -->
217 <record id="action_account_tree1" model="ir.actions.act_window">
218 <field name="name">Analytic Items</field>
219 <field name="res_model">account.analytic.line</field>
220 <field name="view_type">form</field>
221 <field name="view_mode">tree,form</field>
222 <field name="domain">[('account_id','child_of',[active_id])]</field>
223 <field name="context">{'account_id':active_id}</field>
224 <field name="search_view_id" ref="view_account_analytic_line_filter"/>
226 <record id="ir_open_account_analytic_account" model="ir.values">
227 <field eval="'tree_but_open'" name="key2"/>
228 <field eval="'account.analytic.account'" name="model"/>
229 <field name="name">Open Account Tree</field>
230 <field eval="'ir.actions.act_window,%d'%action_account_tree1" name="value"/>
233 <record id="account_analytic_line_extended_form" model="ir.ui.view">
234 <field name="name">account.analytic.line.extended_form</field>
235 <field name="model">account.analytic.line</field>
236 <field name="arch" type="xml">
237 <form string="Project line" version="7.0">
241 <field name="account_id"/>
242 <field name="journal_id"/>
245 <field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
246 <field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
248 <group string="Amount">
249 <field name="amount"/>
250 <label for="amount_currency" groups="base.group_multi_currency"/>
251 <div groups="base.group_multi_currency">
252 <field name="amount_currency" class="oe_inline"/>
253 <field name="currency_id" class="oe_inline"/>
255 <field invisible="1" name="general_account_id"/>
257 <group string="Product Information">
258 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
259 <label for="unit_amount"/>
261 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
262 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
269 <record id="action_account_analytic_account_line_extended_form" model="ir.actions.act_window">
270 <field name="name">account.analytic.line.extended</field>
271 <field name="type">ir.actions.act_window</field>
272 <field name="res_model">account.analytic.line</field>
273 <field name="view_type">form</field>
274 <field name="view_id" ref="account_analytic_line_extended_form"/>
281 <record id="view_account_analytic_journal_tree" model="ir.ui.view">
282 <field name="name">account.analytic.journal.tree</field>
283 <field name="model">account.analytic.journal</field>
284 <field name="arch" type="xml">
285 <tree string="Analytic Journal">
293 <record id="view_analytic_journal_search" model="ir.ui.view">
294 <field name="name">account.analytic.journal.search</field>
295 <field name="model">account.analytic.journal</field>
296 <field name="arch" type="xml">
297 <search string="Analytic Journals">
298 <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Journal"/>
300 <group expand="0" string="Group By...">
301 <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
307 <record id="view_account_analytic_journal_form" model="ir.ui.view">
308 <field name="name">account.analytic.journal.form</field>
309 <field name="model">account.analytic.journal</field>
310 <field name="arch" type="xml">
311 <form string="Analytic Journal" version="7.0">
316 <field name="active"/>
317 <field name="company_id" groups="base.group_multi_company"/>
322 <record id="action_account_analytic_journal_form" model="ir.actions.act_window">
323 <field name="name">Analytic Journals</field>
324 <field name="res_model">account.analytic.journal</field>
325 <field name="view_type">form</field>
326 <field name="view_mode">tree,form</field>
327 <field name="search_view_id" ref="view_analytic_journal_search" />
329 <menuitem groups="analytic.group_analytic_accounting" action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting" sequence="5"/>
332 # Open journal entries
335 <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
336 <field name="name">Analytic Journal Items</field>
337 <field name="res_model">account.analytic.line</field>
338 <field name="view_type">form</field>
339 <field name="view_mode">tree,form</field>
341 <menuitem groups="analytic.group_analytic_accounting"
342 action="action_account_analytic_journal_open_form"
343 id="account_analytic_journal_entries"
344 parent="menu_finance_entries"/>
351 <record id="view_account_journal_1" model="ir.ui.view">
352 <field name="name">account.journal.form.1</field>
353 <field name="model">account.journal</field>
354 <field name="inherit_id" ref="account.view_account_journal_form"/>
355 <field name="arch" type="xml">
356 <field name="type" position="after">
357 <field name="analytic_journal_id"/>