f04e2f3423f19e3f133a45329c2979ef59b21a73
[odoo/odoo.git] / addons / account / account_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <!--
6             Fiscal Year
7         -->
8
9         <record id="view_account_fiscalyear_form" model="ir.ui.view">
10             <field name="name">account.fiscalyear.form</field>
11             <field name="model">account.fiscalyear</field>
12             <field name="type">form</field>
13             <field name="arch" type="xml">
14                 <form string="Fiscalyear">
15                     <group>
16                     <field name="name"/>
17                     <field name="code"/>
18                     <field name="date_start"/>
19                     <field name="date_stop"/>
20                     <field name="company_id" groups="base.group_multi_company"/>
21                     <field name="end_journal_period_id" groups="base.group_extended"/>
22                     </group>
23                     <separator colspan="4" string="Periods"/>
24                     <field colspan="4" name="period_ids" nolabel="1" widget="one2many_list">
25                         <form string="Period">
26                             <field name="name"/>
27                             <field name="code"/>
28                             <field name="date_start"/>
29                             <field name="date_stop"/>
30                             <field name="special"/>
31                         </form>
32                     </field>
33                     <separator colspan="4" string="States"/>
34                     <group>
35                         <field name="state" select="1" readonly="1"/>
36                         <button name="create_period" states="draft" string="Create Monthly Periods" type="object" icon="terp-document-new"/>
37                         <button name="create_period3" states="draft" string="Create 3 Months Periods" type="object" icon="terp-document-new"/>
38                     </group>
39                 </form>
40             </field>
41         </record>
42         <record id="view_account_fiscalyear_tree" model="ir.ui.view">
43             <field name="name">account.fiscalyear.tree</field>
44             <field name="model">account.fiscalyear</field>
45             <field name="type">tree</field>
46             <field name="arch" type="xml">
47                 <tree colors="blue:state == 'draft';gray:state == 'done' " string="Fiscalyear">
48                     <field name="code"/>
49                     <field name="name"/>
50                     <field name="company_id" groups="base.group_multi_company"/>
51                     <field name="state"/>
52                 </tree>
53             </field>
54         </record>
55         <record id="view_account_fiscalyear_search" model="ir.ui.view">
56             <field name="name">account.fiscalyear.search</field>
57             <field name="model">account.fiscalyear</field>
58             <field name="type">search</field>
59             <field name="arch" type="xml">
60                 <search string="Search Fiscalyear">
61                     <group>
62                         <filter string="Open" domain="[('state','=','draft')]" icon="terp-camera_test"/>
63                         <filter string="Closed" domain="[('state','=','done')]" icon="terp-dialog-close"/>
64                         <separator orientation="vertical"/>
65                         <field name="code"/>
66                         <field name="name"/>
67                         <field name="state"/>
68                     </group>
69                     <newline/>
70                     <group expand="0" string="Group By...">
71                         <filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
72                     </group>
73                 </search>
74             </field>
75         </record>
76         <record id="action_account_fiscalyear_form" model="ir.actions.act_window">
77             <field name="name">Fiscal Years</field>
78             <field name="res_model">account.fiscalyear</field>
79             <field name="view_type">form</field>
80             <field name="view_mode">tree,form</field>
81             <field name="help">Define your company's financial year according to your needs. A financial year is a period at the end of which a company's accounts are made up (usually 12 months). The financial year is usually referred to by the date in which it ends. For example, if a company's financial year ends November 30, 2011, then everything between December 1, 2010 and November 30, 2011  would be referred to as FY 2011. You are not obliged to follow the actual calendar year.</field>
82         </record>
83         <menuitem id="next_id_23" name="Periods" parent="account.menu_finance_accounting" sequence="8" />
84         <menuitem action="action_account_fiscalyear_form" id="menu_action_account_fiscalyear_form" parent="next_id_23"/>
85
86         <!--
87             Period
88         -->
89
90         <record id="view_account_period_form" model="ir.ui.view">
91             <field name="name">account.period.form</field>
92             <field name="model">account.period</field>
93             <field name="type">form</field>
94             <field name="arch" type="xml">
95                 <form string="Period">
96                     <field name="name"/>
97                     <field name="code"/>
98                     <field name="date_start"/>
99                     <field name="date_stop"/>
100                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
101                     <field name="fiscalyear_id" widget="selection"/>
102                     <field name="special"/>
103                     <separator colspan="4" string="States"/>
104                     <field name="state"/>
105                     <button name="action_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert" groups="account.group_account_manager"/>
106                 </form>
107             </field>
108         </record>
109         <record id="view_account_period_tree" model="ir.ui.view">
110             <field name="name">account.period.tree</field>
111             <field name="model">account.period</field>
112             <field name="type">tree</field>
113             <field name="arch" type="xml">
114               <tree colors="blue:state == 'draft';gray:state == 'done' " string="Period">
115                     <field name="name"/>
116                     <field name="code"/>
117                     <field name="date_start"/>
118                     <field name="date_stop"/>
119                     <field name="special"/>
120                     <field name="company_id" groups="base.group_multi_company"/>
121                     <field name="state"/>
122                     <button name="action_draft" states="done" string="Set to Draft" type="object" icon="terp-document-new" groups="account.group_account_manager"/>
123                     <button name="%(action_account_period_close)d" states="draft" string="Close Period" type="action" icon="terp-camera_test"/>
124                 </tree>
125             </field>
126         </record>
127
128         <record id="view_account_period_search" model="ir.ui.view">
129             <field name="name">account.period.search</field>
130             <field name="model">account.period</field>
131             <field name="type">search</field>
132             <field name="arch" type="xml">
133                 <search string="Search Period">
134                     <group>
135                         <filter string="To Close" name="draft" domain="[('state','=','draft')]" icon="terp-dialog-close"/>
136                         <separator orientation="vertical"/>
137                         <field name="name"/>
138                         <field name="code"/>
139                     </group>
140                 </search>
141             </field>
142         </record>
143
144         <record id="action_account_period_form" model="ir.actions.act_window">
145             <field name="name">Periods</field>
146             <field name="res_model">account.period</field>
147             <field name="view_type">form</field>
148             <field name="view_mode">tree,form</field>
149             <field name="context">{'search_default_draft': 1}</field>
150             <field name="help">Here you can define a financial period, an interval of time in your company's financial year. An accounting period typically is a month or a quarter. It usually corresponds to the periods of the tax declaration. Create and manage periods from here and decide whether a period should be closed or left open depending on your company's activities over a specific period.</field>
151         </record>
152         <menuitem action="action_account_period_form" id="menu_action_account_period_form" parent="account.next_id_23"/>
153
154
155         <!--
156             Accounts
157         -->
158         <record id="view_account_form" model="ir.ui.view">
159             <field name="name">account.account.form</field>
160             <field name="model">account.account</field>
161             <field name="type">form</field>
162             <field name="arch" type="xml">
163                 <form string="Account">
164                     <group col="6" colspan="4">
165                         <field name="name" select="1"/>
166                         <field name="code" select="1"/>
167                         <field name="company_id" widget="selection" groups="base.group_multi_company"/>
168                         <newline/>
169                         <field name="parent_id"/>
170                         <field name="type" select="1"/>
171                         <field name="user_type" select="1"/>
172                         <field name="active" groups="base.group_extended" />
173                         <newline/>
174                         <field name="debit" invisible="context.get('config_invisible', True)" attrs="{'readonly':[('type','=','view')]}"/>
175                         <field name="credit" invisible="context.get('config_invisible', True)" attrs="{'readonly':[('type','=','view')]}"/>
176                         <field name="balance" invisible="context.get('config_invisible', True)"/>
177                     </group>
178                     <notebook colspan="4">
179                         <page string="General Information">
180                             <newline/>
181                             <group col="2" colspan="2">
182                                 <separator string="Currency" colspan="2"/>
183                                 <field name="currency_id"/>
184                                 <field name="currency_mode" attrs="{'readonly': [('currency_id','=',False)]}"/>
185                             </group>
186                             <group col="2" colspan="2">
187                                 <separator string="Reconcile" colspan="2"/>
188                                 <field name="reconcile"/>
189                             </group>
190                             <separator string="Default Taxes" colspan="4"/>
191                             <field colspan="4" name="tax_ids" nolabel="1" domain="[('parent_id','=',False)]"/>
192                             <separator string="Consolidated Children" colspan="4"/>
193                             <field name="child_consol_ids" colspan="4" nolabel="1" attrs="{'readonly':[('type','!=','consolidation')]}"/>
194                         </page>
195                         <page string="Notes">
196                             <field colspan="4" name="note" nolabel="1"/>
197                         </page>
198                     </notebook>
199                 </form>
200             </field>
201         </record>
202
203         <record id="view_account_search" model="ir.ui.view">
204             <field name="name">account.account.search</field>
205             <field name="model">account.account</field>
206             <field name="type">search</field>
207             <field name="arch" type="xml">
208                 <search string="Accounts">
209                     <group>
210                         <filter icon="terp-sale" string="Receivable Accounts" domain="[('type','=','receivable')]"/>
211                         <filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
212                         <separator orientation="vertical"/>
213                         <field name="code"/>
214                         <field name="name"/>
215                         <field name="user_type"/>
216                     </group>
217                     <newline/>
218                     <group expand="0" string="Group By...">
219                         <filter string="Parent Account" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
220                         <separator orientation="vertical"/>
221                         <filter string="Account Type" icon="terp-stock_symbol-selection" domain="" context="{'group_by':'user_type'}"/>
222                         <filter string="Internal Type" icon="terp-stock_symbol-selection" domain="" context="{'group_by':'type'}"/>
223                     </group>
224                 </search>
225             </field>
226         </record>
227
228         <record id="view_account_list" model="ir.ui.view">
229             <field name="name">account.account.list</field>
230             <field name="model">account.account</field>
231             <field name="type">tree</field>
232             <field name="field_parent">child_id</field>
233             <field name="arch" type="xml">
234                 <tree colors="blue:type == 'view';black:type in ('other','receivable','payable','consolidation');gray:type == 'closed'" string="Chart of accounts" toolbar="1" >
235                     <field name="code"/>
236                     <field name="name"/>
237                     <field name="parent_id" invisible="1"/>
238                     <field name="user_type" invisible="1"/>
239                     <field name="debit"/>
240                     <field name="credit"/>
241                     <field name="balance"/>
242                     <field name="type"/>
243                     <field name="company_id" groups="base.group_multi_company"/>
244                     <field name="company_currency_id"/>
245                 </tree>
246             </field>
247         </record>
248         <record id="view_treasory_graph" model="ir.ui.view">
249            <field name="name">account.treasury.graph</field>
250            <field name="model">account.account</field>
251            <field name="type">graph</field>
252            <field name="arch" type="xml">
253                <graph string="Treasury Analysis" type="bar">
254                   <field name="name"/>
255                   <field name="balance" operator="+"/>
256                </graph>
257          </field>
258       </record>
259         <record id="action_account_form" model="ir.actions.act_window">
260             <field name="name">Accounts</field>
261             <field name="res_model">account.account</field>
262             <field name="view_type">form</field>
263             <field name="view_mode">tree,form,graph</field>
264             <field name="search_view_id" ref="view_account_search"/>
265             <field name="view_id" ref="view_account_list"/>
266             <field name="help">Create and manage the accounts you need to record journal entries. An account is part of a ledger allowing your company to register all kinds of debit and credit transactions. Companies present their annual accounts in two main parts: the balance sheet and the income statement (profit and loss account). The annual accounts of a company are required by law to disclose a certain amount of information. They have to be certified by an external auditor annually.</field>
267         </record>
268         <menuitem id="account_account_menu" name="Accounts" parent="menu_finance_accounting"/>
269         <menuitem action="action_account_form" id="menu_action_account_form" parent="account_account_menu"/>
270
271         <record id="view_account_tree" model="ir.ui.view">
272             <field name="name">account.account.tree</field>
273             <field name="model">account.account</field>
274             <field name="type">tree</field>
275             <field name="field_parent">child_id</field>
276             <field name="arch" type="xml">
277                 <tree colors="blue:type == 'view';black:type in ('other','receivable','payable','consolidation');gray:type == 'closed'" string="Chart of accounts" toolbar="1" >
278                     <field name="code"/>
279                     <field name="name"/>
280                     <field name="debit"/>
281                     <field name="credit"/>
282                     <field name="balance"/>
283                     <field name="company_currency_id"/>
284                     <field name="company_id" groups="base.group_multi_company"/>
285                     <field name="type"/>
286                     <field name="parent_id" invisible="1"/>
287                 </tree>
288             </field>
289         </record>
290         <record id="action_account_tree" model="ir.actions.act_window">
291             <field name="name">Chart of Accounts</field>
292             <field name="res_model">account.account</field>
293             <field name="view_type">tree</field>
294             <field name="view_id" ref="view_account_tree"/>
295             <field name="domain">[('parent_id','=',False)]</field>
296         </record>
297
298          <record id="view_account_gain_loss_tree" model="ir.ui.view">
299            <field name="name">Unrealized Gain or Loss</field>
300             <field name="model">account.account</field>
301             <field name="type">tree</field>
302             <field name="arch" type="xml">
303                 <tree string="Unrealized Gains and losses">
304                     <field name="code"/>
305                     <field name="name"/>
306                     <field name="parent_id" invisible="1"/>
307                     <field name="user_type" invisible="1"/>
308                     <field name="type" invisible="1"/>
309                     <field name="currency_id"/>
310                     <field name="exchange_rate"/>
311                     <field name="foreign_balance"/>
312                     <field name="adjusted_balance"/>
313                     <field name="balance"/>
314                     <field name="unrealized_gain_loss"/>
315                 </tree>
316             </field>
317         </record>
318
319           <record id="action_account_gain_loss" model="ir.actions.act_window">
320             <field name="name">Unrealized Gain or Loss</field>
321             <field name="res_model">account.account</field>
322             <field name="view_type">form</field>
323             <field name="view_mode">tree</field>
324             <field name="view_id" ref="view_account_gain_loss_tree"/>
325             <field name="domain">[('currency_id','!=',False)]</field>
326             <field name="help">When doing multi-currency transactions, you may loose or gain some amount due to changes of exchange rate. This menu gives you a forecast of the Gain or Loss you'd realized if those transactions were ended today. Only for accounts having a secondary currency set.</field>
327         </record>
328
329         <menuitem
330             name="Unrealized Gain or Loss"
331             action="action_account_gain_loss"
332             groups="account.group_account_user"
333             id="menu_unrealized_gains_losses"
334             parent="account.menu_multi_currency"/>
335
336         <!--
337         Journal
338
339         Account Journal Columns
340         -->
341
342         <record id="view_journal_column_form" model="ir.ui.view">
343             <field name="name">account.journal.column.form</field>
344             <field name="model">account.journal.column</field>
345             <field name="type">form</field>
346             <field name="arch" type="xml">
347                 <form string="Journal Column">
348                     <field colspan="4" name="name" select="1"/>
349                     <field name="field" select="1"/>
350                     <field name="sequence"/>
351                 </form>
352             </field>
353         </record>
354         <record id="view_journal_column_tree" model="ir.ui.view">
355             <field name="name">account.journal.column.tree</field>
356             <field name="model">account.journal.column</field>
357             <field name="type">tree</field>
358             <field name="arch" type="xml">
359                 <tree string="Journal Column">
360                     <field name="sequence"/>
361                     <field name="name"/>
362                 </tree>
363             </field>
364         </record>
365
366         <record id="view_account_journal_view_search" model="ir.ui.view">
367             <field name="name">account.journal.view.search</field>
368             <field name="model">account.journal.view</field>
369             <field name="type">search</field>
370             <field name="arch" type="xml">
371                 <search string="Journal View">
372                     <field name="name"/>
373                 </search>
374             </field>
375         </record>
376         <record id="view_account_journal_view_tree" model="ir.ui.view">
377             <field name="name">account.journal.view.tree</field>
378             <field name="model">account.journal.view</field>
379             <field name="type">tree</field>
380             <field name="arch" type="xml">
381                 <tree string="Journal View">
382                     <field name="name"/>
383                 </tree>
384             </field>
385         </record>
386         <record id="view_account_journal_view_form" model="ir.ui.view">
387             <field name="name">account.journal.view.form</field>
388             <field name="model">account.journal.view</field>
389             <field name="type">form</field>
390             <field name="arch" type="xml">
391                 <form string="Journal View">
392                     <field name="name"/>
393                     <field colspan="4" name="columns_id" nolabel="1" widget="one2many_list"/>
394                 </form>
395             </field>
396         </record>
397         <record id="action_account_journal_view" model="ir.actions.act_window">
398             <field name="name">Journal Views</field>
399             <field name="res_model">account.journal.view</field>
400             <field name="view_type">form</field>
401             <field name="view_mode">tree,form</field>
402             <field name="search_view_id" ref="view_account_journal_view_search"/>
403             <field name="help">Here you can customize an existing journal view or create a new view. Journal views determine the way you can record entries in your journal. Select the fields you want to appear in a journal and determine the sequence in which they will appear. Then you can create a new journal and link your view to it.</field>
404         </record>
405
406         <menuitem action="action_account_journal_view" id="menu_action_account_journal_view" parent="account.menu_journals" sequence="20"  groups="base.group_extended"/>
407
408         <!--
409     # Account Journal
410     -->
411
412         <record id="view_account_journal_tree" model="ir.ui.view">
413             <field name="name">account.journal.tree</field>
414             <field name="model">account.journal</field>
415             <field name="type">tree</field>
416             <field name="arch" type="xml">
417                 <tree string="Account Journal">
418                     <field name="code"/>
419                     <field name="name"/>
420                     <field name="type"/>
421                     <field name="user_id"/>
422                     <field name="company_id" groups="base.group_multi_company"/>
423                 </tree>
424             </field>
425         </record>
426         <record id="view_account_journal_search" model="ir.ui.view">
427             <field name="name">account.journal.search</field>
428             <field name="model">account.journal</field>
429             <field name="type">search</field>
430             <field name="arch" type="xml">
431                 <search string="Search Account Journal">
432                     <group>
433                     <filter domain="['|', ('type', '=', 'sale'), ('type', '=', 'sale_refund')]" string="Sale" icon="terp-camera_test"/>
434                     <filter domain="['|', ('type', '=', 'purchase'), ('type', '=', 'purchase_refund')]" string="Purchase" icon="terp-purchase"/>
435                    <filter domain="['|', ('type', '=', 'cash'), ('type', '=', 'bank')]" string="Liquidity" icon="terp-dolar"/>
436                     <filter domain="['|', ('type', '=', 'general'), ('type', '=', 'situation')]" string="Others" icon="terp-stock"/>
437                     <separator orientation="vertical"/>
438                     <field name="code"/>
439                     <field name="name"/>
440                     <field name="user_id"/>
441                     </group>
442                     <newline/>
443                     <group expand="0" string="Group By...">
444                     <filter string="User" context="{'group_by':'user_id'}" icon="terp-personal"/>
445                     <separator orientation="vertical"/>
446                     <filter string="Type" context="{'group_by':'type'}" icon="terp-stock_symbol-selection"/>
447                     </group>
448                 </search>
449             </field>
450         </record>
451         <record id="view_account_journal_form" model="ir.ui.view">
452             <field name="name">account.journal.form</field>
453             <field name="model">account.journal</field>
454             <field name="type">form</field>
455             <field name="arch" type="xml">
456                 <form string="Account Journal">
457                     <group colspan="4" col="6">
458                         <field name="name" select="1"/>
459                         <field name="code" select="1"/>
460                         <field name="type" on_change="onchange_type(type, currency, context)"/>
461                     </group>
462                     <notebook colspan="4">
463                         <page string="General Information">
464                             <group col="2" colspan="2">
465                                 <group colspan="2" col="2">
466                                     <separator string="Accounts" colspan="4"/>
467                                     <field name="default_debit_account_id" attrs="{'required':[('type','in', ('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
468                                     <field name="default_credit_account_id" attrs="{'required':[('type','in',('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
469                                 </group>
470                                 <group colspan="2" col="2">
471                                     <separator string="Journal View" colspan="4"/>
472                                     <field name="view_id" widget="selection"/>
473                                 </group>
474                             </group>
475
476                             <group colspan="2" col="2">
477                                 <separator string="Company" colspan="4"/>
478                                 <field name="company_id" groups="base.group_multi_company"/>
479                                 <field name="user_id" groups="base.group_extended"/>
480                                 <field name="currency" groups="base.group_extended"/>
481                             </group>
482                             <group colspan="2" col="2" groups="base.group_extended">
483                                 <separator string="Validations" colspan="4"/>
484                                 <field name="allow_date"/>
485                             </group>
486                             <group colspan="2" col="2">
487                                 <separator string="Other Configuration" colspan="4"/>
488                                 <field name="centralisation" groups="base.group_extended"/>
489                                 <field name="entry_posted"/>
490                             </group>
491                             <group colspan="2" col="2">
492                                 <separator string="Invoicing Data" colspan="4"/>
493 <!--                                <field name="invoice_sequence_id"/>-->
494                                 <field name="group_invoice_lines"/>
495                             </group>
496                             <group colspan="2" col="2"> <!-- can't set the field as hidden for certain groups as it's required in the object and not in the view, and GTK doesn't handle that correctly -->
497                                 <separator string="Sequence" colspan="4"/>
498                                 <field name="sequence_id" required="0"/>
499                             </group>
500                         </page>
501                         <page string="Entry Controls" groups="base.group_extended">
502                             <separator colspan="4" string="Accounts Type Allowed (empty for no control)"/>
503                             <field colspan="4" name="type_control_ids" nolabel="1"/>
504                             <separator colspan="4" string="Accounts Allowed (empty for no control)"/>
505                             <field colspan="4" name="account_control_ids" nolabel="1"/>
506                         </page>
507                     </notebook>
508                 </form>
509             </field>
510         </record>
511         <record id="action_account_journal_form" model="ir.actions.act_window">
512             <field name="name">Journals</field>
513             <field name="res_model">account.journal</field>
514             <field name="view_type">form</field>
515             <field name="view_mode">tree,form</field>
516             <field name="help">Create and manage your company's journals from this menu. A journal is used to record transactions of all accounting data related to the day-to-day business of your company using double-entry bookkeeping system. Depending on the nature of its activities and the number of daily transactions, a company may keep several types of specialized journals such as a cash journal, purchase journal, sales journal...</field>
517         </record>
518         <menuitem action="action_account_journal_form" id="menu_action_account_journal_form" parent="menu_journals"/>
519
520         <record id="view_account_bank_statement_filter" model="ir.ui.view">
521             <field name="name">account.cash.statement.select</field>
522             <field name="model">account.bank.statement</field>
523             <field name="type">search</field>
524             <field name="arch" type="xml">
525                 <search string="Search Bank Statements">
526                     <group>
527                         <filter string="Draft" name="state_draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
528                         <filter string="Open" name="state_open" domain="[('state','=','open')]" icon="terp-check"/>
529                         <filter string="Confirmed" name="state_confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
530                         <separator orientation="vertical"/>
531                         <field name="date"/>
532                         <field name="name"/>
533                         <field name="journal_id" widget='selection' domain="[('type', '=', 'cash')]" />
534                     </group>
535                     <newline/>
536                     <group expand="0" string="Group By...">
537                         <filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
538                         <filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
539                         <separator orientation="vertical"/>
540                         <filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
541                     </group>
542                 </search>
543             </field>
544         </record>
545
546         <record id="view_bank_statement_tree" model="ir.ui.view">
547             <field name="name">account.bank.statement.tree</field>
548             <field name="model">account.bank.statement</field>
549             <field name="type">tree</field>
550             <field name="arch" type="xml">
551                 <tree colors="red:balance_end_real!=balance_end and state=='draft';blue:state=='draft' and (balance_end_real==balance_end);black:state=='confirm'" string="Statement">
552                     <field name="name"/>
553                     <field name="date"/>
554                     <field name="period_id"/>
555                     <field name="journal_id"/>
556                     <field name="balance_start"/>
557                     <field name="balance_end_real"/>
558                     <field name="balance_end" invisible="1"/>
559                     <field name="state"/>
560                     <button type="object" string="Cancel" name="button_cancel" states="confirm" icon="gtk-cancel"/>
561                     <button type="object" string="Confirm" name="button_confirm_bank" states="draft" icon="terp-camera_test"/>
562                 </tree>
563             </field>
564         </record>
565         <record id="view_bank_statement_search" model="ir.ui.view">
566             <field name="name">account.bank.statement.search</field>
567             <field name="model">account.bank.statement</field>
568             <field name="type">search</field>
569             <field name="arch" type="xml">
570                 <search string="Search Bank Statements">
571                     <group>
572                         <filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
573                         <filter string="Confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
574                         <separator orientation="vertical"/>
575                         <field name="name"/>
576                         <field name="date"/>
577                         <field name="period_id"/>
578                         <field name="journal_id" widget="selection" domain="[('type', '=', 'bank')]" />
579                     </group>
580                     <newline/>
581                     <group expand="0" string="Group By...">
582                         <filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
583                         <filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
584                         <separator orientation="vertical"/>
585                         <filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
586                     </group>
587                 </search>
588             </field>
589         </record>
590         <record id="view_bank_statement_form" model="ir.ui.view">
591             <field name="name">account.bank.statement.form</field>
592             <field name="model">account.bank.statement</field>
593             <field name="type">form</field>
594             <field name="arch" type="xml">
595                 <form string="Bank Statement">
596                     <group col="7" colspan="4">
597                         <field name="name" select="1"/>
598                         <field name="date" select="1" on_change="onchange_date(date, company_id)"/>
599                         <field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" select="1" widget="selection"/>
600                         <newline/>
601                         <field name="period_id"/>
602                         <field name="balance_start"/>
603                         <field name="balance_end_real"/>
604                         <field name="currency" invisible="1"/>
605                         <field name='company_id' widget="selection" groups="base.group_multi_company" />
606                     </group>
607                     <notebook colspan="4">
608                         <page string="Transaction" name="statement_line_ids">
609                             <field colspan="4" name="line_ids" nolabel="1" context="{'date':date}">
610                                 <tree editable="bottom" string="Statement lines">
611                                     <field name="sequence" readonly="1" invisible="1"/>
612                                     <field name="date" groups="base.group_extended"/>
613                                     <field name="name"/>
614                                     <field name="ref"/>
615                                     <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
616                                     <field name="type" on_change="onchange_type(partner_id, type)"/>
617                                     <field domain="[('journal_id','=',parent.journal_id), ('company_id', '=', parent.company_id)]" name="account_id"/>
618                                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]"/>
619                                     <field name="amount"/>
620                                 </tree>
621                                 <form string="Statement lines">
622                                     <field name="date"/>
623                                     <field name="name"/>
624                                     <field name="ref"/>
625                                     <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
626                                     <field name="type" on_change="onchange_type(partner_id, type)"/>
627                                     <field domain="[('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view'), ('company_id', '=', parent.company_id)]" name="account_id"/>
628                                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]"/>
629                                     <field name="amount"/>
630                                     <field name="sequence" readonly="0"/>
631                                     <separator colspan="4" string="Notes"/>
632                                     <field colspan="4" name="note" nolabel="1"/>
633                                 </form>
634                             </field>
635                         </page>
636                         <page string="Journal Entries" name="move_live_ids">
637                             <field colspan="4" name="move_line_ids" nolabel="1"/>
638                         </page>
639                     </notebook>
640                     <group col="8" colspan="4">
641                         <field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
642                         <field name="balance_end"/>
643                         <button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
644                         <button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
645                         <button name="button_confirm_bank" states="draft" string="Confirm" type="object"  icon="terp-camera_test"/>
646                     </group>
647                 </form>
648             </field>
649         </record>
650
651         <record id="view_bank_statement_periodic_form" model="ir.ui.view">
652             <field name="name">account.bank.statement.reconcile.form</field>
653             <field name="model">account.bank.statement</field>
654             <field name="type">form</field>
655             <field name="arch" type="xml">
656                 <form string="Bank Statement">
657                     <group col="7" colspan="4">
658                         <field name="name" select="1"/>
659                         <field name="date" select="1" on_change="onchange_date(date, company_id)"/>
660                         <field name='company_id' widget="selection" groups="base.group_multi_company" />
661                         <field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" widget="selection"/>
662                         <newline/>
663                         <field name="period_id"/>
664                         <field name="balance_start"/>
665                         <field name="balance_end_real"/>
666                         <field name="currency" invisible="1"/>
667                         <field name="account_id" invisible="1"/>
668                     </group>
669                     <notebook colspan="4">
670                         <page string="Journal Entries">
671                             <field colspan="4" name="move_line_ids" nolabel="1" widget="many2many" domain="[('account_id','=',account_id),('statement_id', '=', False)]">
672                                 <tree string="Statement lines">
673                                     <field name="date"/>
674                                     <field name="period_id"/>
675                                     <field name="journal_id"/>
676                                     <field name="ref"/>
677                                     <field name="name"/>
678                                     <field name="account_id"/>
679                                     <field name="partner_id"/>
680                                     <field name="debit"/>
681                                     <field name="credit"/>
682                                 </tree>
683                             </field>
684                         </page>
685                     </notebook>
686                     <group col="8" colspan="4">
687                         <field name="state"/>
688                         <field name="balance_end"/>
689                         <button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
690                         <button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
691                         <button name="button_confirm_bank" states="draft" string="Confirm" type="object"  icon="terp-camera_test"/>
692                     </group>
693                 </form>
694             </field>
695         </record>
696
697         <record id="action_bank_statement_tree" model="ir.actions.act_window">
698             <field name="name">Bank Statements</field>
699             <field name="res_model">account.bank.statement</field>
700             <field name="view_type">form</field>
701             <field name="view_mode">tree,form,graph</field>
702             <field name="domain">[('journal_id.type', '=', 'bank')]</field>
703             <field name="context">{'journal_type':'bank'}</field>
704             <field name="search_view_id" ref="view_bank_statement_search"/>
705             <field name="help">A bank statement is a summary of all financial transactions occurring over a given period of time on a deposit account, a credit card or any other type of financial account. The starting balance will be proposed automatically and the closing balance is to be found on your statement. When you are in the Payment column of a line, you can press F1 to open the reconciliation form.</field>
706         </record>
707         <record model="ir.actions.act_window.view" id="action_bank_statement_tree_bank">
708             <field name="sequence" eval="1"/>
709             <field name="view_mode">tree</field>
710             <field name="view_id" ref="view_bank_statement_tree"/>
711             <field name="act_window_id" ref="action_bank_statement_tree"/>
712         </record>
713         <record model="ir.actions.act_window.view" id="action_bank_statement_form_bank">
714             <field name="sequence" eval="1"/>
715             <field name="view_mode">form</field>
716             <field name="view_id" ref="view_bank_statement_form"/>
717             <field name="act_window_id" ref="action_bank_statement_tree"/>
718         </record>
719
720     <record id="action_bank_statement_periodic_tree" model="ir.actions.act_window">
721             <field name="name">Bank Statements</field>
722             <field name="res_model">account.bank.statement</field>
723             <field name="view_type">form</field>
724             <field name="view_mode">tree,form,graph</field>
725             <field name="domain">[('journal_id.type', '=', 'bank')]</field>
726             <field name="search_view_id" ref="view_bank_statement_search"/>
727             <field name="context">{'journal_type':'bank'}</field>
728         </record>
729         <record model="ir.actions.act_window.view" id="action_bank_statement_periodic_tree_bank">
730             <field name="sequence" eval="1"/>
731             <field name="view_mode">tree</field>
732             <field name="view_id" ref="view_bank_statement_tree"/>
733             <field name="act_window_id" ref="action_bank_statement_periodic_tree"/>
734         </record>
735         <record model="ir.actions.act_window.view" id="action_bank_statement_periodic_form_bank">
736             <field name="sequence" eval="1"/>
737             <field name="view_mode">form</field>
738             <field name="view_id" ref="view_bank_statement_periodic_form"/>
739             <field name="act_window_id" ref="action_bank_statement_periodic_tree"/>
740         </record>
741
742         <menuitem string="Bank Statements" action="action_bank_statement_tree" id="menu_bank_statement_tree" parent="menu_finance_bank_and_cash" sequence="7"/>
743         <menuitem name="Statements Reconciliation" action="action_bank_statement_periodic_tree" id="menu_menu_Bank_process" parent="account.menu_account_pp_statements" sequence="7"/>
744
745
746         <record id="action_bank_statement_draft_tree" model="ir.actions.act_window">
747             <field name="name">Draft statements</field>
748             <field name="res_model">account.bank.statement</field>
749             <field name="view_type">form</field>
750             <field name="view_mode">tree,form</field>
751             <field name="domain">[('state','=','draft')]</field>
752             <field name="filter" eval="True"/>
753         </record>
754
755         <!--
756     Account Types
757     -->
758         <record id="view_account_type_search" model="ir.ui.view">
759             <field name="name">account.account.type.search</field>
760             <field name="model">account.account.type</field>
761             <field name="type">search</field>
762             <field name="arch" type="xml">
763                 <search string="Account Type">
764                     <field name="name"/>
765                     <field name="code"/>
766                 </search>
767             </field>
768         </record>
769
770         <record id="view_account_type_tree" model="ir.ui.view">
771             <field name="name">account.account.type.tree</field>
772             <field name="model">account.account.type</field>
773             <field name="type">tree</field>
774             <field name="arch" type="xml">
775                 <tree string="Account Type">
776                     <field name="name"/>
777                     <field name="code"/>
778                 </tree>
779             </field>
780         </record>
781
782         <record id="view_account_type_form" model="ir.ui.view">
783             <field name="name">account.account.type.form</field>
784             <field name="model">account.account.type</field>
785             <field name="type">form</field>
786             <field name="arch" type="xml">
787                 <form string="Account Type">
788                     <group col="6" colspan="4">
789                         <field name="name" select="1"/>
790                         <field name="code" select="1"/>
791                     </group>
792                     <group col="2" colspan="2">
793                         <separator string="Reporting Configuration" colspan="4"/>
794                         <field name="report_type" select="2"/>
795                     </group>
796                     <group col="2" colspan="2">
797                         <separator string="Closing Method" colspan="4"/>
798                         <field name="close_method"/>
799                     </group>
800                     <separator string="Description" colspan="4"/>
801                     <field name="note" colspan="4" nolabel="1"/>
802                 </form>
803             </field>
804         </record>
805         <record id="action_account_type_form" model="ir.actions.act_window">
806             <field name="name">Account Types</field>
807             <field name="res_model">account.account.type</field>
808             <field name="view_type">form</field>
809             <field name="view_mode">tree,form</field>
810             <field name="search_view_id" ref="view_account_type_search"/>
811             <field name="help">An account type is used to determine how an account is used in each journal. The deferral method of an account type determines the process for the annual closing. Reports such as the Balance Sheet and the Profit and Loss report use the category (profit/loss or balance sheet). For example, the account type could be linked to an asset account, expense account or payable account. From this view, you can create and manage the account types you need for your company.</field>
812         </record>
813         <menuitem action="action_account_type_form" sequence="20" id="menu_action_account_type_form" parent="account_account_menu" groups="base.group_extended"/>
814         <!--
815     Entries
816     -->
817         <record id="view_account_move_tree" model="ir.ui.view">
818             <field name="name">account.move.tree</field>
819             <field name="model">account.move</field>
820             <field name="type">tree</field>
821             <field name="arch" type="xml">
822                 <tree colors="blue:state == 'draft';black:state == 'posted'" string="Journal Entries">
823                     <field name="name"/>
824                     <field name="ref"/>
825                     <field name="date"/>
826                     <field name="period_id"/>
827                     <field name="journal_id"/>
828                     <field name="partner_id"/>
829                     <field name="amount" sum="Total Amount"/>
830                     <field name="state"/>
831                 </tree>
832             </field>
833         </record>
834
835         <!--
836     Reconcile
837     -->
838
839         <record id="view_move_reconcile_form" model="ir.ui.view">
840             <field name="name">account.move.reconcile.form</field>
841             <field name="model">account.move.reconcile</field>
842             <field name="type">form</field>
843             <field name="arch" type="xml">
844                 <form string="Journal Entry Reconcile">
845                     <group col="6" colspan="4">
846                         <field name="name" select="1"/>
847                         <field name="create_date" select="1"/>
848                         <field name="type" select="1"/>
849                     </group>
850                     <separator colspan="4" string="Reconcile Entries"/>
851                     <field colspan="4" name="line_id" nolabel="1"/>
852                     <separator colspan="4" string="Partial Reconcile Entries"/>
853                     <field colspan="4" name="line_partial_ids" nolabel="1"/>
854                 </form>
855             </field>
856         </record>
857
858         <!--
859     Tax Codes
860     -->
861         <record id="view_tax_code_search" model="ir.ui.view">
862             <field name="name">account.tax.code.search</field>
863             <field name="model">account.tax.code</field>
864             <field name="type">search</field>
865             <field name="arch" type="xml">
866                 <search string="Account Tax Code">
867                     <field name="name"/>
868                     <field name="code"/>
869                     <field name="parent_id"/>
870                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
871                 </search>
872             </field>
873         </record>
874         <record id="view_tax_code_tree" model="ir.ui.view">
875             <field name="name">account.tax.code.tree</field>
876             <field name="model">account.tax.code</field>
877             <field name="type">tree</field>
878             <field name="field_parent">child_ids</field>
879             <field name="priority">100</field>
880             <field name="arch" type="xml">
881                 <tree string="Account Tax Code" toolbar="1">
882                     <field name="name"/>
883                     <field name="code"/>
884                     <field name="sum_period"/>
885                     <field name="sum"/>
886                     <field name="company_id" groups="base.group_multi_company"/>
887                 </tree>
888             </field>
889         </record>
890         <record id="view_tax_code_form" model="ir.ui.view">
891             <field name="name">account.tax.code.form</field>
892             <field name="model">account.tax.code</field>
893             <field name="type">form</field>
894             <field name="arch" type="xml">
895                 <form string="Account Tax Code">
896                     <group col="6" colspan="4">
897                         <field name="name"/>
898                         <field name="code"/>
899                         <field name="parent_id"/>
900                         <field name="company_id" groups="base.group_multi_company"/>
901                     </group>
902                     <group colspan="2" col="2">
903                         <separator string="Reporting Configuration" colspan="4"/>
904                         <field name="notprintable"/>
905                         <field name="sign"/>
906                     </group>
907                     <group colspan="2" col="2">
908                         <separator string="Statistics" colspan="4"/>
909                         <field name="sum_period"/>
910                         <field name="sum"/>
911                     </group>
912                     <separator string="Description" colspan="4"/>
913                     <field colspan="4" name="info" nolabel="1"/>
914                 </form>
915             </field>
916         </record>
917         <record id="action_tax_code_list" model="ir.actions.act_window">
918             <field name="name">Tax codes</field>
919             <field name="res_model">account.tax.code</field>
920             <field name="view_type">form</field>
921             <field name="view_mode">tree,form</field>
922             <field name="view_id" ref="view_tax_code_tree"/>
923             <field name="search_view_id" ref="view_tax_code_search"/>
924             <field name="help">The tax code definition depends on the tax declaration of your country. OpenERP allows you to define the tax structure and manage it from this menu. You can define both numeric and alphanumeric tax codes.</field>
925         </record>
926        <menuitem id="next_id_27" name="Taxes" parent="account.menu_finance_accounting"/>
927        <menuitem action="action_tax_code_list" id="menu_action_tax_code_list" parent="next_id_27" sequence="12"/>
928
929
930         <!--
931     Tax
932     -->
933         <record id="view_tax_tree" model="ir.ui.view">
934             <field name="name">account.tax.tree</field>
935             <field name="model">account.tax</field>
936             <field name="type">tree</field>
937             <field name="field_parent">child_ids</field>
938             <field name="arch" type="xml">
939                 <tree string="Account Tax">
940                     <field name="name"/>
941                     <field name="price_include" groups="base.group_extended"/>
942                     <field name="description"/>
943                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
944                 </tree>
945             </field>
946         </record>
947         <record id="view_account_tax_search" model="ir.ui.view">
948             <field name="name">account.tax.search</field>
949             <field name="model">account.tax</field>
950             <field name="type">search</field>
951             <field name="arch" type="xml">
952                 <search string="Search Taxes">
953                     <group>
954                         <field name="name"/>
955                         <field name="description"/>
956                         <field name="company_id" widget="selection" groups="base.group_multi_company"/>
957                     </group>
958                 </search>
959             </field>
960         </record>
961         <record id="view_tax_form" model="ir.ui.view">
962             <field name="name">account.tax.form</field>
963             <field name="model">account.tax</field>
964             <field name="type">form</field>
965             <field name="arch" type="xml">
966                 <form string="Account Tax">
967                     <group colspan="4" col="6">
968                         <field name="name"/>
969                         <field name="description"/>
970                         <field name="type_tax_use"/>
971                         <field name="price_include"/>
972                         <field name="active"/>
973                         <field name="company_id" widget="selection" groups="base.group_multi_company"/>
974                     </group>
975                     <notebook colspan="4">
976                         <page string="Tax Definition" >
977                           <group colspan="4" col="4">
978                                   <field name="type"/>
979                                   <field name="amount" attrs="{'readonly':[('type','in',('none', 'code', 'balance'))]}"/>
980                                   <separator colspan="4" string="Accounting Information"/>
981                                   <field name="account_collected_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
982                                   <label colspan="2" nolabel="1" string="Keep empty to use the income account"/>
983                                   <field name="account_paid_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
984                                   <label colspan="2" nolabel="1" string="Keep empty to use the expense account"/>
985                                   <separator colspan="4" string="Tax Declaration: Invoices"/>
986                                   <field name="base_code_id"/>
987                                   <field name="base_sign"/>
988                                   <field name="tax_code_id"/>
989                                   <field name="tax_sign"/>
990                                   <separator colspan="4" string="Tax Declaration: Credit Notes"/>
991                                   <field name="ref_base_code_id"/>
992                                   <field name="ref_base_sign"/>
993                                   <field name="ref_tax_code_id"/>
994                                   <field name="ref_tax_sign"/>
995                                   <separator groups="base.group_extended" colspan="4" string="Children Definition"/>
996                                   <field groups="base.group_extended" name="child_depend"/>
997                                   <field groups="base.group_extended" name="sequence"/>
998                                   <field groups="base.group_extended" name="include_base_amount"/>
999                                   <field groups="base.group_extended" colspan="4" name="child_ids">
1000                                       <tree string="Account Tax">
1001                                           <field name="sequence"/>
1002                                           <field name="name"/>
1003                                           <field name="price_include" groups="base.group_extended"/>
1004                                           <field name="description"/>
1005                                      </tree>
1006                                  </field>
1007                           </group>
1008                         </page>
1009                         <page groups="base.group_extended" string="Special Computation">
1010                             <separator colspan="4" string="Applicability Options"/>
1011                             <field name="applicable_type"/>
1012                             <field name="domain"/>
1013                             <separator colspan="4" string="Applicable Code (if type=code)"/>
1014                             <field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')], 'required':[('applicable_type','=','code')]}"/>
1015                             <separator colspan="2" string="Compute Code"/>
1016                             <separator colspan="2" string="Reverse Compute Code"/>
1017                             <field colspan="2" name="python_compute" nolabel="1" attrs="{'readonly':[('type','!=','code')],'required':[('type','=','code')]}"/>
1018                             <field colspan="2" name="python_compute_inv" nolabel="1" attrs="{'readonly':[('type','!=','code')],'required':[('type','=','code')]}"/>
1019
1020                         </page>
1021                     </notebook>
1022                 </form>
1023               </field>
1024         </record>
1025         <record id="action_tax_form" model="ir.actions.act_window">
1026             <field name="name">Taxes</field>
1027             <field name="res_model">account.tax</field>
1028             <field name="view_type">form</field>
1029             <field name="view_id" ref="view_tax_tree"/>
1030             <field name="domain">[('parent_id','=',False)]</field>
1031         </record>
1032         <menuitem action="action_tax_form" id="menu_action_tax_form" parent="next_id_27"/>
1033
1034         <record id="action_tax_code_tree" model="ir.actions.act_window">
1035             <field name="name">Chart of Taxes</field>
1036             <field name="res_model">account.tax.code</field>
1037             <field name="domain">[('parent_id','=',False)]</field>
1038             <field name="view_type">tree</field>
1039             <field name="view_id" ref="view_tax_code_tree"/>
1040             <field name="help">The chart of taxes is used to generate your periodical tax statement. You will see the taxes with codes related to your legal statement according to your country.</field>
1041         </record>
1042
1043         <!--
1044     Entries lines
1045     -->
1046
1047         <record id="view_move_line_tree" model="ir.ui.view">
1048             <field name="name">account.move.line.tree</field>
1049             <field name="model">account.move.line</field>
1050             <field name="type">tree</field>
1051             <field eval="4" name="priority"/>
1052             <field name="arch" type="xml">
1053                 <tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items" editable="top" on_write="on_create_write">
1054                     <field name="date"/>
1055                     <field name="period_id"/>
1056                     <field name="move_id"/>
1057                     <field name="ref"/>
1058                     <field name="invoice"/>
1059                     <field name="name"/>
1060                     <field name="partner_id" on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"/>
1061                     <field name="account_id" domain="[('journal_id','=',journal_id), ('company_id', '=', company_id)]"/>
1062                     <field name="journal_id"/>
1063                     <field name="debit" sum="Total debit"/>
1064                     <field name="credit" sum="Total credit"/>
1065                     <field name="account_tax_id" groups="base.group_extended"/>
1066                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
1067                     <field name="amount_currency" groups="base.group_extended" attrs="{'readonly':[('state','=','valid')]}"/>
1068                     <field name="currency_id" groups="base.group_extended" attrs="{'readonly':[('state','=','valid')]}"/>
1069                     <field name="reconcile_partial_id" groups="base.group_extended"/>
1070                     <field name="reconcile_id"/>
1071                     <field name="state"/>
1072                     <field name="company_id" invisible="True"/>
1073                 </tree>
1074             </field>
1075         </record>
1076
1077         <record id="view_move_line_form" model="ir.ui.view">
1078             <field name="name">account.move.line.form</field>
1079             <field name="model">account.move.line</field>
1080             <field name="type">form</field>
1081             <field eval="2" name="priority"/>
1082             <field name="arch" type="xml">
1083                 <form string="Journal Item">
1084                     <group col="6" colspan="4">
1085                         <field name="name" select="1"/>
1086                         <field name="ref"/>
1087                         <field name="partner_id" select="1" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
1088
1089                         <field name="journal_id"/>
1090                         <field name="period_id"/>
1091                         <field name="company_id" required="1" groups="base.group_multi_company"/>
1092                     </group>
1093                     <notebook colspan="4">
1094                         <page string="Information">
1095                             <group col="2" colspan="2">
1096                                 <separator colspan="2" string="Amount"/>
1097                                 <field name="account_id" select="1" domain="[('company_id', '=', company_id), ('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation')]"/>
1098                                 <field name="debit"/>
1099                                 <field name="credit"/>
1100                                 <field name="quantity"/>
1101                             </group>
1102
1103                             <group col="2" colspan="2">
1104                                 <separator colspan="2" string="Accounting Documents"/>
1105                                 <field name="invoice" readonly="True"/>
1106                                 <field name="move_id" required="False"/>
1107                                 <field name="statement_id" readonly="True"/>
1108                             </group>
1109
1110                             <group col="2" colspan="2">
1111                                 <separator colspan="2" string="Dates"/>
1112                                 <field name="date" select="1"/>
1113                                 <field name="date_maturity"/>
1114                                 <field name="date_created" readonly="True"/>
1115                             </group>
1116
1117                             <group col="2" colspan="2">
1118                                 <separator colspan="2" string="Taxes"/>
1119                                 <field name="tax_code_id"/>
1120                                 <field name="tax_amount"/>
1121                                 <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1122                             </group>
1123
1124                             <group col="2" colspan="2" attrs="{'readonly':[('state','=','valid')]}" >
1125                                 <separator colspan="2" string="Currency"/>
1126                                 <field name="currency_id"/>
1127                                 <field name="amount_currency"/>
1128                             </group>
1129
1130                             <group col="2" colspan="2">
1131                                 <separator colspan="2" string="Reconciliation"/>
1132                                 <field name="reconcile_id"/>
1133                                 <field name="reconcile_partial_id"/>
1134                             </group>
1135
1136                             <group col="2" colspan="2">
1137                                 <separator colspan="2" string="States"/>
1138                                 <field name="state"/>
1139                                 <field name="blocked"/>
1140                             </group>
1141
1142                             <group col="2" colspan="2"  groups="base.group_extended">
1143                                 <separator colspan="2" string="Analytic"/>
1144                                 <field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="analytic.group_analytic_accounting"/>
1145                             </group>
1146                             <separator string="Internal Note" colspan="4"/>
1147                             <field name="narration" colspan="4" nolabel="1"/>
1148                         </page>
1149                         <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1150                             <field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
1151                         </page>
1152                     </notebook>
1153                 </form>
1154             </field>
1155         </record>
1156
1157         <record id="view_move_line_form2" model="ir.ui.view">
1158             <field name="name">account.move.line.form2</field>
1159             <field name="model">account.move.line</field>
1160             <field name="type">form</field>
1161             <field eval="9" name="priority"/>
1162             <field name="arch" type="xml">
1163                 <form string="Journal Item">
1164                     <notebook colspan="4">
1165                         <page string="Information">
1166                             <separator colspan="4" string="General Information"/>
1167                             <field name="name" select="1"/>
1168                             <field name="date"/>
1169                             <field name="journal_id" readonly="False" select="1"/>
1170                             <field name="period_id" readonly="False"/>
1171                             <field name="account_id" select="1" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation'),('company_id', '=', company_id)]"/>
1172                             <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
1173                             <newline/>
1174                             <field name="debit"/>
1175                             <field name="credit"/>
1176
1177                             <separator colspan="4" string="Optional Information"/>
1178                             <field name="currency_id"/>
1179                             <field name="amount_currency"/>
1180                             <field name="quantity" select="3"/>
1181                             <field name="move_id" required="False"/>
1182                             <newline/>
1183                             <field name="date_maturity"/>
1184                             <field name="date_created"/>
1185                             <field name="date_created"/>
1186                             <field name="blocked" select="3"/>
1187                             <newline/>
1188                             <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1189                             <field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="analytic.group_analytic_accounting"/>
1190                             <separator colspan="4" string="State"/>
1191                             <newline/>
1192                             <field name="reconcile_id"/>
1193                             <field name="reconcile_partial_id"/>
1194                             <field name="state"/>
1195                         </page>
1196                         <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1197                             <field colspan="4" name="analytic_lines" nolabel="1" />
1198                         </page>
1199                     </notebook>
1200                 </form>
1201             </field>
1202         </record>
1203
1204         <record id="account_move_line_graph" model="ir.ui.view">
1205             <field name="name">account.move.line.graph</field>
1206             <field name="model">account.move.line</field>
1207             <field name="type">graph</field>
1208             <field name="arch" type="xml">
1209                 <graph string="Account Statistics" type="bar">
1210                     <field name="account_id"/>
1211                     <field name="debit" operator="+"/>
1212                     <field name="credit" operator="+"/>
1213                 </graph>
1214             </field>
1215         </record>
1216
1217         <record id="view_account_move_line_filter" model="ir.ui.view">
1218             <field name="name">Journal Items</field>
1219             <field name="model">account.move.line</field>
1220             <field name="type">search</field>
1221             <field name="arch" type="xml">
1222                 <search string="Search Journal Items">
1223                     <group>
1224                         <filter icon="terp-document-new" string="Unbalanced" domain="[('state','=','draft')]" help="Unbalanced Journal Items"/>
1225                         <separator orientation="vertical"/>
1226                         <filter icon="terp-document-new" string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Journal Items"/>
1227                         <filter name="posted" icon="terp-camera_test" string="Posted" domain="[('move_id.state','=','posted')]" help="Posted Journal Items"/>
1228                         <separator orientation="vertical"/>
1229                         <filter
1230                             icon="terp-dolar_ok!"
1231                             string="Unreconciled"
1232                             domain="[('reconcile_id','=',False), ('account_id.reconcile','=',True)]" help="Unreconciled Journal Items"
1233                             name="unreconciled"/>
1234                         <separator orientation="vertical"/>
1235                         <field name="move_id" string="Number (Move)"/>
1236                         <field name="date"/>
1237                         <field name="account_id"/>
1238                         <field name="partner_id">
1239                             <filter help="Next Partner Entries to reconcile" name="next_partner" context="{'next_partner_only': 1}" icon="terp-gtk-jump-to-ltr" domain="[('account_id.reconcile','=',True),('reconcile_id','=',False)]"/>
1240                         </field>
1241                     </group>
1242                     <newline/>
1243                     <group>
1244                         <field name="journal_id" widget="selection" context="{'journal_id':self}"/>
1245                         <field name="period_id" context="{'period_id':self}"/>
1246                     </group>
1247                     <newline/>
1248                     <group expand="0" string="Group By...">
1249                         <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
1250                         <separator orientation="vertical"/>
1251                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1252                         <filter string="Account"  icon="terp-folder-green" context="{'group_by':'account_id'}"/>
1253                         <separator orientation="vertical"/>
1254                         <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
1255                     </group>
1256                     <newline/>
1257                 </search>
1258             </field>
1259         </record>
1260
1261         <record id="action_account_moves_all_a" model="ir.actions.act_window">
1262             <field name="name">Journal Items</field>
1263             <field name="res_model">account.move.line</field>
1264             <field name="view_type">form</field>
1265             <field name="view_mode">tree,form</field>
1266             <field name="context">{}</field>
1267             <field name="search_view_id" ref="view_account_move_line_filter"/>
1268             <field name="help">This view can be used by accountants in order to quickly record entries in OpenERP. If you want to record a supplier invoice, start by recording the line of the expense account. OpenERP will propose to you automatically the Tax related to this account and the counterpart "Account Payable".</field>
1269         </record>
1270
1271         <menuitem
1272             action="action_account_moves_all_a"
1273             icon="STOCK_JUSTIFY_FILL"
1274             id="menu_action_account_moves_all"
1275             parent="account.menu_finance_entries"
1276             sequence="1"
1277             groups="group_account_user"
1278         />
1279
1280         <record id="action_view_move_line" model="ir.actions.act_window">
1281             <field name="name">Lines to reconcile</field>
1282             <field name="res_model">account.move.line</field>
1283             <field name="view_type">form</field>
1284             <field name="view_mode">tree,form</field>
1285             <field name="domain">[('account_id.reconcile', '=', True),('reconcile_id','=',False)]</field>
1286             <field eval="False" name="view_id"/>
1287             <field eval="True" name="filter"/>
1288             <field name="search_view_id" ref="view_account_move_line_filter"/>
1289         </record>
1290
1291         <record id="action_move_line_select" model="ir.actions.act_window">
1292             <field name="name">Journal Items</field>
1293             <field name="res_model">account.move.line</field>
1294             <field name="view_type">form</field>
1295             <field name="view_mode">tree,form</field>
1296             <field name="view_id" ref="view_move_line_tree"/>
1297             <field name="search_view_id" ref="view_account_move_line_filter"/>
1298             <field name="context">{'search_default_account_id': [active_id]}</field>
1299         </record>
1300
1301         <record id="ir_account_move_line_select" model="ir.values">
1302             <field name="key2">tree_but_open</field>
1303             <field name="model">account.account</field>
1304             <field name="name">Open Journal Items</field>
1305             <field eval="'ir.actions.act_window,%d'%action_move_line_select" name="value"/>
1306         </record>
1307         <!--
1308     Account.Entry Edition
1309     -->
1310
1311         <record id="account_move_graph" model="ir.ui.view">
1312             <field name="name">account.move.graph</field>
1313             <field name="model">account.move</field>
1314             <field name="type">graph</field>
1315             <field name="arch" type="xml">
1316                 <graph string="Account Statistics" type="bar">
1317                     <field name="period_id"/>
1318                     <field name="amount" operator="+"/>
1319                 </graph>
1320             </field>
1321          </record>
1322         <record id="view_move_tree" model="ir.ui.view">
1323             <field name="name">account.move.tree</field>
1324             <field name="model">account.move</field>
1325             <field name="type">tree</field>
1326             <field name="arch" type="xml">
1327                 <tree colors="blue:state == 'draft';black:state == 'posted'" string="Journal Entries">
1328                     <field name="name"/>
1329                     <field name="ref"/>
1330                     <field name="date"/>
1331                     <field name="period_id"/>
1332                     <field name="journal_id"/>
1333                     <field name="partner_id"/>
1334                     <field name="amount" sum="Total Amount"/>
1335                     <field name="to_check" groups="base.group_extended"/>
1336                     <field name="state"/>
1337                     <button name="button_validate" states="draft" string="Approve" type="object" icon="terp-camera_test"/>
1338                 </tree>
1339             </field>
1340         </record>
1341         <record id="view_move_form" model="ir.ui.view">
1342             <field name="name">account.move.form</field>
1343             <field name="model">account.move</field>
1344             <field name="type">form</field>
1345             <field name="arch" type="xml">
1346                 <form string="Journal Entries">
1347                     <group colspan="4" col="6">
1348                         <field name="name" readonly="True"/>
1349                         <field name="ref"/>
1350                         <field name="to_check" groups="base.group_extended"/>
1351                         <field name="journal_id"/>
1352                         <field name="period_id"/>
1353                         <field name="date"/>
1354                         <field name="company_id" required="1" groups="base.group_multi_company"/>
1355                         <field name="partner_id" invisible="1"/>
1356                         <field name="amount" invisible="1"/>
1357                     </group>
1358                     <notebook colspan="4">
1359                         <page string="Journal Items">
1360                             <field name="balance" invisible="1"/>
1361                             <field colspan="4" name="line_id" nolabel="1" height="250" widget="one2many_list" 
1362                             on_change="onchange_line_id(line_id)"
1363                             context="{'balance': balance , 'journal': journal_id }">
1364                                 <form string="Journal Item">
1365                                     <group col="6" colspan="4">
1366                                         <field name="name"/>
1367                                         <field name="ref"/>
1368                                         <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
1369
1370                                         <field name="journal_id"/>
1371                                         <field name="period_id"/>
1372                                         <field name="company_id" required="1" groups="base.group_multi_company"/>
1373                                     </group>
1374                                     <notebook colspan="4">
1375                                         <page string="Information">
1376                                             <group col="2" colspan="2">
1377                                                 <separator colspan="2" string="Amount"/>
1378                                                 <field name="account_id" domain="[('company_id', '=', parent.company_id), ('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
1379                                                 <field name="debit"/>
1380                                                 <field name="credit"/>
1381                                                 <field name="quantity"/>
1382                                             </group>
1383
1384                                             <group col="2" colspan="2">
1385                                                 <separator colspan="2" string="Accounting Documents"/>
1386                                                 <field name="invoice"/>
1387                                                 <field name="move_id" required="False"/>
1388                                                 <field name="statement_id"/>
1389                                             </group>
1390
1391                                             <group col="2" colspan="2">
1392                                                 <separator colspan="2" string="Dates"/>
1393                                                 <field name="date"/>
1394                                                 <field name="date_maturity"/>
1395                                                 <field name="date_created"/>
1396                                             </group>
1397
1398                                             <group col="2" colspan="2">
1399                                                 <separator colspan="2" string="Taxes"/>
1400                                                 <field name="tax_code_id"/>
1401                                                 <field name="tax_amount"/>
1402                                                 <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1403                                             </group>
1404
1405                                             <group col="2" colspan="2">
1406                                                 <separator colspan="2" string="Currency"/>
1407                                                 <field name="currency_id"/>
1408                                                 <field name="amount_currency"/>
1409                                             </group>
1410
1411                                             <group col="2" colspan="2">
1412                                                 <separator colspan="2" string="Reconciliation"/>
1413                                                 <field name="reconcile_id"/>
1414                                                 <field name="reconcile_partial_id"/>
1415                                             </group>
1416
1417                                             <group col="2" colspan="2">
1418                                                 <separator colspan="2" string="States"/>
1419                                                 <field name="state"/>
1420                                                 <field name="blocked"/>
1421                                             </group>
1422
1423                                             <group col="2" colspan="2" groups="base.group_extended">
1424                                                 <separator colspan="2" string="Analytic"/>
1425                                                 <field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="analytic.group_analytic_accounting"/>
1426                                             </group>
1427                                             <separator string="Internal Note" colspan="4"/>
1428                                             <field name="narration" colspan="4" nolabel="1"/>
1429                                         </page>
1430                                         <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1431                                             <field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
1432                                         </page>
1433                                     </notebook>
1434                                 </form>
1435                                 <tree colors="blue:state == 'draft';black:state == 'posted'" editable="top" string="Journal Items">
1436                                     <field name="ref"/>
1437                                     <field name="invoice"/>
1438                                     <field name="name"/>
1439                                     <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
1440                                     <field name="account_id" domain="[('journal_id','=',parent.journal_id),('company_id', '=', parent.company_id)]"/>
1441                                     <field name="date_maturity"/>
1442                                     <field name="debit" sum="Total Debit"/>
1443                                     <field name="credit" sum="Total Credit"/>
1444                                     <field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="analytic.group_analytic_accounting"/>
1445                                     <field name="amount_currency" groups="base.group_extended"/>
1446                                     <field name="currency_id" groups="base.group_extended"/>
1447                                     <field name="tax_code_id"/>
1448                                     <field name="tax_amount"/>
1449                                     <field name="state"/>
1450                                     <field name="reconcile_id"/>
1451                                     <field name="reconcile_partial_id" groups="base.group_extended"/>
1452                                 </tree>
1453                             </field>
1454                             <separator colspan="4" string="Internal Note"/>
1455                             <field name="narration" colspan="4" nolabel="1" height="50"/>
1456                             <group col="4" colspan="4">
1457                                 <field name="state" select="1"/>
1458                                 <button name="button_cancel" states="posted" string="Cancel" type="object" icon="gtk-cancel"/>
1459                                 <button name="button_validate" states="draft" string="Post" type="object" icon="terp-camera_test"/>
1460                             </group>
1461                         </page>
1462                     </notebook>
1463                 </form>
1464             </field>
1465         </record>
1466
1467         <record id="view_account_move_filter" model="ir.ui.view">
1468             <field name="name">account.move.select</field>
1469             <field name="model">account.move</field>
1470             <field name="type">search</field>
1471             <field name="arch" type="xml">
1472                 <search string="Search Move">
1473                     <group>
1474                         <filter icon="terp-document-new" string="Unposted" domain="[('state','=','draft')]" help="Unposted Journal Entries"/>
1475                         <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Journal Entries"/>
1476                         <separator orientation="vertical"/>
1477                         <filter icon="terp-gtk-jump-to-ltr" string="To Review" domain="[('to_check','=',True)]" groups="base.group_extended" help="Journal Entries to Review"/>
1478                         <separator orientation="vertical"/>
1479                         <field name="name"/>
1480                         <field name="ref"/>
1481                         <field name="partner_id"/>
1482                         <field name="date"/>
1483                     </group>
1484                     <newline/>
1485                     <group>
1486                         <field name="journal_id" widget="selection"/>
1487                         <field name="period_id"/>
1488                     </group>
1489                     <newline/>
1490                     <group expand="0" string="Group By...">
1491                         <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
1492                         <separator orientation="vertical"/>
1493                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1494                         <filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
1495                         <separator orientation="vertical"/>
1496                         <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
1497                         <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
1498                     </group>
1499                 </search>
1500             </field>
1501         </record>
1502
1503         <record id="action_move_journal_line" model="ir.actions.act_window">
1504             <field name="name">Journal Entries</field>
1505             <field name="res_model">account.move</field>
1506             <field name="view_type">form</field>
1507             <field name="view_mode">tree,form,graph</field>
1508             <field name="view_id" ref="view_move_tree"/>
1509             <field name="search_view_id" ref="view_account_move_filter"/>
1510             <field name="help">A journal entry consists of several journal items, each of which is either a debit or a credit transaction. OpenERP automatically creates one journal entry per accounting document: invoice, refund, supplier payment, bank statements, etc.</field>
1511         </record>
1512
1513         <menuitem
1514             icon="STOCK_JUSTIFY_FILL"
1515             action="action_move_journal_line"
1516             id="menu_action_move_journal_line_form"
1517             parent="account.menu_finance_entries"
1518             groups="group_account_user"
1519             sequence="5"/>
1520
1521         <record id="action_move_line_form" model="ir.actions.act_window">
1522             <field name="name">Entries</field>
1523             <field name="type">ir.actions.act_window</field>
1524             <field name="res_model">account.move</field>
1525             <field name="view_type">form</field>
1526             <field name="view_id" ref="view_move_tree"/>
1527             <field name="search_view_id" ref="view_account_move_filter"/>
1528         </record>
1529
1530         <act_window
1531             id="act_account_move_to_account_move_line_open"
1532             name="Journal Items"
1533             context="{'search_default_move_id':[active_id], 'default_move_id': active_id}"
1534             res_model="account.move.line"
1535             src_model="account.move"/>
1536
1537         <record id="action_move_line_search" model="ir.actions.act_window">
1538             <field name="name">Journal Items</field>
1539             <field name="type">ir.actions.act_window</field>
1540             <field name="res_model">account.move.line</field>
1541             <field name="view_type">form</field>
1542             <field name="view_mode">tree,form</field>
1543             <field name="view_id" ref="view_move_line_tree"/>
1544             <field name="search_view_id" ref="view_account_move_line_filter"/>
1545         </record>
1546         <record id="action_move_line_search_view1" model="ir.actions.act_window.view">
1547             <field eval="10" name="sequence"/>
1548             <field name="view_mode">tree</field>
1549             <field name="view_id" ref="view_move_line_tree"/>
1550             <field name="act_window_id" ref="action_move_line_search"/>
1551         </record>
1552         <record id="action_move_line_search_view2" model="ir.actions.act_window.view">
1553             <field eval="11" name="sequence"/>
1554             <field name="view_mode">form</field>
1555             <field name="act_window_id" ref="action_move_line_search"/>
1556         </record>
1557
1558         <act_window
1559             context="{'search_default_next_partner':1,'view_mode':True}"
1560             id="action_account_manual_reconcile" name="Journal Items"
1561             res_model="account.move.line"
1562             view_id="view_move_line_tree"/>
1563
1564
1565         <menuitem
1566              name="Manual Reconciliation" icon="STOCK_EXECUTE"
1567              action="action_account_manual_reconcile"
1568              id="menu_manual_reconcile"
1569              parent="account.periodical_processing_reconciliation"/>
1570
1571
1572         <act_window
1573             id="act_account_acount_move_line_open"
1574             name="Entries"
1575             context="{'search_default_account_id':[active_id], 'search_default_unreconciled':0, 'default_account_id': active_id}"
1576             res_model="account.move.line"
1577             src_model="account.account"/>
1578
1579         <act_window
1580             id="act_account_acount_move_line_open_unreconciled"
1581             name="Unreconciled Entries"
1582             res_model="account.move.line"
1583             context="{'search_default_account_id':[active_id], 'search_default_unreconciled':1, 'default_account_id': active_id}"
1584             src_model="account.account"/>
1585
1586         <act_window
1587             domain="[('reconcile_id', '=', active_id)]"
1588             id="act_account_acount_move_line_reconcile_open"
1589             name="Reconciled entries"
1590             res_model="account.move.line"
1591             src_model="account.move.reconcile"/>
1592
1593
1594         <!--
1595     TODO:
1596         Print Journal (and change state)
1597         Close Journal (and verify that there is no draft Entry Lines)
1598 -->
1599
1600         <record id="view_journal_period_tree" model="ir.ui.view">
1601             <field name="name">account.journal.period.tree</field>
1602             <field name="model">account.journal.period</field>
1603             <field name="type">tree</field>
1604             <field name="arch" type="xml">
1605                 <tree colors="blue:state == 'draft';gray:state == 'done';black:state == 'printed'" string="Journals">
1606                     <field icon="icon" name="fiscalyear_id"/>
1607                     <field name="period_id"/>
1608                     <field name="journal_id"/>
1609                     <field name="state"/>
1610                     <field name="company_id" groups="base.group_multi_company"/>
1611                 </tree>
1612             </field>
1613         </record>
1614         <record id="action_account_journal_period_tree" model="ir.actions.act_window">
1615             <field name="name">Journals</field>
1616             <field name="res_model">account.journal.period</field>
1617             <field name="view_type">tree</field>
1618             <field name="help">You can search for individual account entries through useful information. To search for account entries, open a journal, then select a record line.</field>
1619         </record>
1620
1621         <!--
1622         # Account Models
1623         -->
1624
1625         <record id="view_model_line_tree" model="ir.ui.view">
1626             <field name="name">account.model.line.tree</field>
1627             <field name="model">account.model.line</field>
1628             <field name="type">tree</field>
1629             <field name="arch" type="xml">
1630                 <tree string="Journal Entry Model Line" editable="bottom">
1631                     <field name="sequence"/>
1632                     <field name="name"/>
1633                     <field name="account_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation'), ('company_id', '=', parent.company_id)]"/>
1634                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1635                     <field name="partner_id"/>
1636                     <field name="debit"/>
1637                     <field name="credit"/>
1638                     <field name="date_maturity"/>
1639                 </tree>
1640             </field>
1641         </record>
1642
1643
1644         <record id="view_model_line_form" model="ir.ui.view">
1645             <field name="name">account.model.line.form</field>
1646             <field name="model">account.model.line</field>
1647             <field name="type">form</field>
1648             <field name="arch" type="xml">
1649                 <form string="Journal Entry Model Line">
1650                     <field colspan="4" name="name" select="1"/>
1651                     <field name="sequence"/>
1652                     <field name="account_id" domain="[('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation'), ('company_id', '=', parent.company_id)]"/>
1653                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1654                     <field name="partner_id"/>
1655                     <field name="debit" select="1"/>
1656                     <field name="credit" select="1"/>
1657                     <field name="quantity"/>
1658                     <field name="date_maturity"/>
1659                 </form>
1660             </field>
1661         </record>
1662
1663         <record id="view_model_form" model="ir.ui.view">
1664             <field name="name">account.model.form</field>
1665             <field name="model">account.model</field>
1666             <field name="type">form</field>
1667             <field name="arch" type="xml">
1668                 <form string="Journal Entry Model">
1669                     <field name="name"/>
1670                     <field name="journal_id"/>
1671                     <field name="company_id" widget='selection' groups="base.group_multi_company"/>
1672                     <field colspan="4" nolabel="1" name="lines_id" height="250" widget="one2many_list"/>
1673                     <separator string="Legend" colspan="4"/>
1674                     <field name="legend" colspan="4" nolabel="1"/>
1675                     <group col="1" colspan="4">
1676                         <button name="%(action_account_use_model_create_entry)d" string="Create entries" type="action" icon="gtk-execute"/>
1677                     </group>
1678                 </form>
1679             </field>
1680         </record>
1681
1682         <record id="view_model_tree" model="ir.ui.view">
1683             <field name="name">account.model.tree</field>
1684             <field name="model">account.model</field>
1685             <field name="type">tree</field>
1686             <field name="arch" type="xml">
1687                 <tree string="Journal Entry Model">
1688                     <field name="name"/>
1689                     <field name="journal_id"/>
1690                     <field name="company_id" groups="base.group_multi_company"/>
1691                 </tree>
1692             </field>
1693         </record>
1694
1695         <record id="view_model_search" model="ir.ui.view">
1696             <field name="name">account.model.search</field>
1697             <field name="model">account.model</field>
1698             <field name="type">search</field>
1699             <field name="arch" type="xml">
1700                 <search string="Journal Entry Model">
1701                   <group>
1702                     <filter string="Sale" icon="terp-camera_test" domain="[('journal_id.type', '=', 'sale')]"/>
1703                     <filter string="Purchase" icon="terp-purchase" domain="[('journal_id.type', '=', 'purchase')]"/>
1704                     <separator orientation="vertical"/>
1705                       <field name="name"/>
1706                       <field name="journal_id" widget="selection"/>
1707                       <field name="company_id" widget="selection" groups="base.group_multi_company"/>
1708                     </group>
1709                     <newline/>
1710                     <group expand="0" string="Group By...">
1711                       <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1712                     </group>
1713                 </search>
1714             </field>
1715         </record>
1716
1717         <record id="action_model_form" model="ir.actions.act_window">
1718             <field name="name">Recurring Models</field>
1719             <field name="res_model">account.model</field>
1720             <field name="view_type">form</field>
1721             <field name="view_mode">tree,form</field>
1722             <field name="search_view_id" ref="view_model_search"/>
1723         </record>
1724         <menuitem
1725             action="action_model_form" id="menu_action_model_form" sequence="5"
1726             parent="account.menu_configuration_misc" groups="base.group_extended"/>
1727
1728         <!--
1729             # Payment Terms
1730         -->
1731
1732         <record id="view_payment_term_line_tree" model="ir.ui.view">
1733             <field name="name">account.payment.term.line.tree</field>
1734             <field name="model">account.payment.term.line</field>
1735             <field name="type">tree</field>
1736             <field name="arch" type="xml">
1737                 <tree string="Payment Term">
1738                     <field name="sequence"/>
1739                     <field name="name"/>
1740                     <field name="value"/>
1741                     <field name="value_amount"/>
1742                     <field name="days"/>
1743                     <field name="days2"/>
1744                 </tree>
1745             </field>
1746         </record>
1747
1748
1749         <record id="view_payment_term_line_form" model="ir.ui.view">
1750             <field name="name">account.payment.term.line.form</field>
1751             <field name="model">account.payment.term.line</field>
1752             <field name="type">form</field>
1753             <field name="arch" type="xml">
1754                 <form string="Payment Term">
1755                     <group>
1756                         <group colspan="2" col="4">
1757                             <field name="name" select="1"/>
1758                             <separator string="Amount Computation" colspan="4"/>
1759                             <field name="value" colspan="4"/>
1760                             <field name="value_amount" colspan="4" attrs="{'readonly':[('value','=','balance')]}"/>
1761                         </group>
1762                         <group colspan="2" col="4">
1763                             <field name="sequence"/>
1764                             <separator string="Due Date Computation" colspan="4"/>
1765                             <field name="days" colspan="4"/>
1766                             <field name="days2" colspan="4"/>
1767                         </group>
1768                     </group>
1769                     <newline/>
1770                     <separator string="Example" colspan="4"/>
1771                     <label string="At 14 net days 2 percent, remaining amount at 30 days end of month." colspan="4"/>
1772                     <group colspan="2" col="2">
1773                         <label string="Line 1:" colspan="2"/>
1774                         <label string="  Valuation: Percent"/>
1775                         <label string="  Number of Days: 14"/>
1776                         <label string="  Value amount: 0.02"/>
1777                         <label string="  Day of the Month: 0"/>
1778                     </group>
1779                     <newline/>
1780                     <group colspan="2" col="2">
1781                         <label string="Line 2:" colspan="2"/>
1782                         <label string="  Valuation: Balance"/>
1783                         <label string="  Number of Days: 30"/>
1784                         <label string="  Value amount: n.a"/>
1785                         <label string="  Day of the Month= -1"/>
1786                     </group>
1787                 </form>
1788             </field>
1789         </record>
1790
1791         <record id="view_payment_term_search" model="ir.ui.view">
1792             <field name="name">account.payment.term.search</field>
1793             <field name="model">account.payment.term</field>
1794             <field name="type">search</field>
1795             <field name="arch" type="xml">
1796                 <search string="Payment Term">
1797                     <field name="name"/>
1798                     <field name="active"/>
1799                 </search>
1800             </field>
1801         </record>
1802
1803         <record id="view_payment_term_form" model="ir.ui.view">
1804             <field name="name">account.payment.term.form</field>
1805             <field name="model">account.payment.term</field>
1806             <field name="type">form</field>
1807             <field name="arch" type="xml">
1808                 <form string="Payment Term">
1809                     <separator colspan="4" string="Information"/>
1810                     <field name="name" select="1"/>
1811                     <field name="active" select="1"/>
1812                     <separator colspan="4" string="Description On Invoices"/>
1813                     <field colspan="4" name="note" nolabel="1"/>
1814                     <separator colspan="4" string="Computation"/>
1815                     <field colspan="4" name="line_ids" nolabel="1"/>
1816                 </form>
1817             </field>
1818         </record>
1819
1820         <record id="action_payment_term_form" model="ir.actions.act_window">
1821             <field name="name">Payment Terms</field>
1822             <field name="res_model">account.payment.term</field>
1823             <field name="view_type">form</field>
1824             <field name="view_mode">tree,form</field>
1825             <field name="search_view_id" ref="view_payment_term_search"/>
1826         </record>
1827         <menuitem action="action_payment_term_form"
1828             id="menu_action_payment_term_form" parent="menu_configuration_misc"/>
1829
1830         <!--
1831         # Account Subscriptions
1832         -->
1833
1834         <record id="view_subscription_line_form" model="ir.ui.view">
1835             <field name="name">account.subscription.line.form</field>
1836             <field name="model">account.subscription.line</field>
1837             <field name="type">form</field>
1838             <field name="arch" type="xml">
1839                 <form string="Subscription lines">
1840                     <field name="date"/>
1841                     <field name="move_id"/>
1842                 </form>
1843             </field>
1844         </record>
1845
1846         <record id="view_subscription_line_tree" model="ir.ui.view">
1847             <field name="name">account.subscription.line.tree</field>
1848             <field name="model">account.subscription.line</field>
1849             <field name="type">tree</field>
1850             <field name="arch" type="xml">
1851                 <tree string="Subscription lines">
1852                     <field name="date"/>
1853                     <field name="move_id"/>
1854                 </tree>
1855             </field>
1856         </record>
1857
1858         <record id="view_subscription_tree" model="ir.ui.view">
1859             <field name="name">account.subscription.tree</field>
1860             <field name="model">account.subscription</field>
1861             <field name="type">tree</field>
1862             <field name="arch" type="xml">
1863                 <tree colors="blue:state == 'draft';gray:state == 'done';black:state == 'running'" string="Entry Subscription">
1864                     <field name="name"/>
1865                     <field name="model_id"/>
1866                     <field name="ref"/>
1867                     <field name="date_start"/>
1868                     <field name="state"/>
1869                 </tree>
1870             </field>
1871         </record>
1872
1873          <record id="view_subscription_search" model="ir.ui.view">
1874             <field name="name">account.subscription.search</field>
1875             <field name="model">account.subscription</field>
1876             <field name="type">search</field>
1877             <field name="arch" type="xml">
1878                 <search string="Entry Subscription">
1879                     <group>
1880                         <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Subscription"/>
1881                         <filter icon="terp-camera_test" string="Running" domain="[('state','=','running')]" help="Running Subscription"/>
1882                         <separator orientation="vertical"/>
1883                         <field name="name"/>
1884                         <field name="model_id"/>
1885                         <field name="date_start"/>
1886                     </group>
1887                     <newline/>
1888                     <group expand="0" string="Group By...">
1889                         <filter string="Model" icon="terp-folder-orange" domain="[]" context="{'group_by':'model_id'}"/>
1890                         <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
1891                     </group>
1892                 </search>
1893             </field>
1894         </record>
1895
1896         <record id="view_subscription_form" model="ir.ui.view">
1897             <field name="name">account.subscription.form</field>
1898             <field name="model">account.subscription</field>
1899             <field name="type">form</field>
1900             <field name="arch" type="xml">
1901                 <form string="Recurring">
1902                     <group col="6" colspan="4">
1903                         <field name="name" select="1"/>
1904                         <field name="model_id"/>
1905                         <field name="ref" select="1"/>
1906                     </group>
1907                     <group col="2" colspan="2">
1908                         <separator colspan="4" string="Starts on"/>
1909                         <field name="date_start" select="1"/>
1910                         <field name="period_total"/>
1911                     </group>
1912
1913                     <group col="2" colspan="2">
1914                         <separator colspan="4" string="Valid Up to"/>
1915                         <field name="period_nbr"/>
1916                         <field name="period_type"/>
1917                     </group>
1918
1919                     <group col="2" colspan="2">
1920                     </group>
1921                     <separator colspan="4" string="Subscription Lines"/>
1922                     <field colspan="4" name="lines_id" widget="one2many_list" nolabel="1"/>
1923
1924                     <group col="6" colspan="4">
1925                         <field name="state"/>
1926                         <button name="state_draft" states="done" string="Set to Draft" type="object"  icon="gtk-convert" />
1927                         <button name="compute" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
1928                         <button name="remove_line" states="running" string="Remove Lines" type="object" icon="gtk-remove"/>
1929                     </group>
1930                 </form>
1931             </field>
1932         </record>
1933         <record id="action_subscription_form" model="ir.actions.act_window">
1934             <field name="name">Recurring Lines</field>
1935             <field name="res_model">account.subscription</field>
1936             <field name="view_type">form</field>
1937             <field name="view_mode">tree,form</field>
1938             <field name="search_view_id" ref="view_subscription_search"/>
1939             <field name="help">A recurring entry is a miscellaneous entry that occurs on a recurrent basis from a specific date, i.e. corresponding to the signature of a contract or an agreement with a customer or a supplier. With Define Recurring Entries, you can create such entries to automate the postings in the system.</field>
1940         </record>
1941         <menuitem
1942             name="Define Recurring Entries" action="action_subscription_form"
1943             groups="base.group_extended"
1944             id="menu_action_subscription_form" sequence="1"
1945             parent="account.menu_finance_recurrent_entries"/>
1946
1947         <record id="action_subscription_form_running" model="ir.actions.act_window">
1948             <field name="name">Running Subscriptions</field>
1949             <field name="res_model">account.subscription</field>
1950             <field name="view_type">form</field>
1951             <field name="view_mode">tree,form</field>
1952             <field name="domain">[('state','=','running')]</field>
1953             <field name="filter" eval="True"/>
1954         </record>
1955
1956         <record id="action_subscription_form_new" model="ir.actions.act_window">
1957             <field name="name">New Subscription</field>
1958             <field name="res_model">account.subscription</field>
1959             <field name="view_type">form</field>
1960             <field name="view_mode">form,tree</field>
1961             <field name="view_id" ref="view_subscription_form"/>
1962         </record>
1963
1964         <record id="view_subscription_line_form_complete" model="ir.ui.view">
1965             <field name="name">account.subscription.line.form</field>
1966             <field name="model">account.subscription.line</field>
1967             <field name="type">form</field>
1968             <field eval="20" name="priority"/>
1969             <field name="arch" type="xml">
1970                 <form string="Subscription lines">
1971                     <field name="subscription_id"/>
1972                     <field name="date"/>
1973                     <field name="move_id"/>
1974                 </form>
1975             </field>
1976         </record>
1977
1978         <record id="action_move_line_tree1" model="ir.actions.act_window">
1979             <field name="name">Journal Items</field>
1980             <field name="res_model">account.move.line</field>
1981             <field name="view_type">form</field>
1982             <field name="view_mode">tree,form</field>
1983             <field name="domain">[('account_id','child_of', [active_id]),('state','&lt;&gt;','draft')]</field>
1984             <field name="context">{'account_id':active_id}</field>
1985         </record>
1986
1987         <record id="view_move_line_tax_tree" model="ir.ui.view">
1988             <field name="name">account.move.line.tax.tree</field>
1989             <field name="model">account.move.line</field>
1990             <field name="type">tree</field>
1991             <field eval="4" name="priority"/>
1992             <field name="arch" type="xml">
1993                 <tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items">
1994                     <field name="date"/>
1995                     <field name="move_id"/>
1996                     <field name="statement_id" string="St."/>
1997                     <field name="name"/>
1998                     <field name="partner_id"/>
1999                     <field name="account_id"/>
2000                     <field name="tax_code_id"/>
2001                     <field name="tax_amount"/>
2002                     <field name="debit" sum="Total debit"/>
2003                     <field name="credit" sum="Total credit"/>
2004                     <field name="account_tax_id"/>
2005                     <field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="analytic.group_analytic_accounting"/>
2006                     <field name="state"/>
2007                 </tree>
2008             </field>
2009         </record>
2010
2011         <record id="action_tax_code_line_open" model="ir.actions.act_window">
2012             <field name="name">Journal Items</field>
2013             <field name="res_model">account.move.line</field>
2014             <field name="view_type">form</field>
2015             <field name="view_mode">tree,form</field>
2016             <field name="view_id" ref="view_move_line_tax_tree"/>
2017             <field name="domain">[('tax_code_id','child_of',active_id),('state','&lt;&gt;','draft')]</field>
2018         </record>
2019         <record id="ir_open_tax_move_line" model="ir.values">
2020             <field name="key2">tree_but_open</field>
2021             <field name="model">account.tax.code</field>
2022             <field name="name">Tax Details</field>
2023             <field eval="'ir.actions.act_window,%d'%action_tax_code_line_open" name="value"/>
2024         </record>
2025
2026
2027         <!--
2028     # Admin config
2029     -->
2030
2031         <act_window
2032            id="act_account_journal_2_account_bank_statement"
2033            name="Bank statements"
2034            context="{'search_default_journal_id': active_id, 'default_journal_id': active_id}"
2035            res_model="account.bank.statement"
2036            src_model="account.journal"/>
2037
2038         <act_window
2039            id="act_account_journal_2_account_move_line"
2040            name="Journal Items"
2041            context="{'search_default_journal_id':active_id, 'default_journal_id': active_id}"
2042            res_model="account.move.line"
2043            src_model="account.journal"/>
2044
2045         <act_window
2046             context="{'search_default_reconcile_id':False, 'search_default_partner_id':[active_id], 'default_partner_id': active_id}"
2047             domain="[('account_id.reconcile', '=', True),('account_id.type', 'in', ['receivable', 'payable'])]"
2048             id="act_account_partner_account_move_all"
2049             name="Receivables &amp; Payables"
2050             res_model="account.move.line"
2051             src_model="res.partner"
2052             groups="base.group_extended"/>
2053
2054         <act_window context="{'search_default_partner_id':[active_id], 'default_partner_id': active_id}" id="act_account_partner_account_move" name="Journal Items" res_model="account.move.line" src_model="res.partner" groups="account.group_account_user"/>
2055
2056         <record id="view_account_addtmpl_wizard_form" model="ir.ui.view">
2057             <field name="name">Create Account</field>
2058             <field name="model">account.addtmpl.wizard</field>
2059             <field name="type">form</field>
2060             <field name="arch" type="xml">
2061                 <form string="Create Account">
2062                     <separator col="4" colspan="4" string="Create an Account based on this template"/>
2063                     <field name="cparent_id"/>
2064                     <newline/>
2065                     <group col="2" colspan="2">
2066                         <button icon="gtk-cancel" special="cancel" string="Cancel" name="action_cancel" type="object"/>
2067                         <button icon="gtk-ok" name="action_create" string="Add" type="object"/>
2068                     </group>
2069                 </form>
2070             </field>
2071         </record>
2072
2073         <act_window domain="[]" id="action_account_addtmpl_wizard_form"
2074             name="Create Account"
2075             target="new"
2076             res_model="account.addtmpl.wizard"
2077             context="{'tmpl_ids': active_id}"
2078             src_model="account.account.template"
2079             view_type="form" view_mode="form"/>
2080
2081         <!-- Account Templates -->
2082         <menuitem
2083             id="account_template_folder"
2084             name="Templates"
2085             parent="menu_finance_accounting"
2086             groups="base.group_multi_company"/>
2087         <menuitem
2088             id="account_template_taxes"
2089             name="Taxes"
2090             parent="account_template_folder"
2091             sequence="2"/>
2092         <menuitem
2093             id="account_template_accounts"
2094             name="Accounts"
2095             parent="account_template_folder"
2096             sequence="1"/>
2097
2098
2099         <record id="view_account_template_form" model="ir.ui.view">
2100             <field name="name">account.account.template.form</field>
2101             <field name="model">account.account.template</field>
2102             <field name="type">form</field>
2103             <field name="arch" type="xml">
2104                 <form string="Account Template">
2105                     <notebook>
2106                         <page string="General Information">
2107                             <field name="name"/>
2108                             <field name="code"/>
2109                             <newline/>
2110                             <field name="parent_id"/>
2111                             <field name="shortcut"/>
2112                             <field name="type"/>
2113                             <field name="user_type"/>
2114
2115                             <field name="currency_id"/>
2116                             <field name="reconcile"/>
2117                             <field name="chart_template_id"/>
2118                             <separator string="Default taxes" colspan="4"/>
2119                             <field name="tax_ids" colspan="4" nolabel="1"/>
2120                         </page>
2121                         <page string="Notes">
2122                             <field colspan="4" name="note" nolabel="1"/>
2123                         </page>
2124                     </notebook>
2125                 </form>
2126             </field>
2127         </record>
2128
2129         <record id="view_account_template_tree" model="ir.ui.view">
2130             <field name="name">account.account.template.tree</field>
2131             <field name="model">account.account.template</field>
2132             <field name="type">tree</field>
2133             <field name="arch" type="xml">
2134                 <tree string="Account Template">
2135                     <field name="code"/>
2136                     <field name="name"/>
2137                     <field name="type" invisible="1"/>
2138                     <field name="user_type" invisible="1"/>
2139                 </tree>
2140             </field>
2141         </record>
2142
2143         <record id="view_account_template_search" model="ir.ui.view">
2144             <field name="name">account.account.template.search</field>
2145             <field name="model">account.account.template</field>
2146             <field name="type">search</field>
2147             <field name="arch" type="xml">
2148                 <search string="Search Account Templates">
2149                     <group>
2150                         <filter icon="terp-sale" string="Receivale Accounts" domain="[('type','=','receivable')]"/>
2151                          <filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
2152                          <separator orientation="vertical"/>
2153                         <field name="code"/>
2154                         <field name="name"/>
2155                         <field name="parent_id"/>
2156                         <field name="type"/>
2157                         <field name="user_type"/>
2158                     </group>
2159                     <newline/>
2160                     <group expand="0" string="Group By...">
2161                         <filter string="Internal Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
2162                         <filter string="Account Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'user_type'}"/>
2163                    </group>
2164                 </search>
2165             </field>
2166         </record>
2167
2168         <record id="action_account_template_form" model="ir.actions.act_window">
2169             <field name="name">Account Templates</field>
2170             <field name="res_model">account.account.template</field>
2171             <field name="view_type">form</field>
2172             <field name="view_mode">tree,form</field>
2173             <field name="search_view_id" ref="view_account_template_search"/>
2174         </record>
2175
2176         <menuitem action="action_account_template_form" id="menu_action_account_template_form" parent="account_template_accounts"/>
2177
2178         <!-- Chart of Accounts Templates -->
2179
2180         <record id="view_account_chart_template_form" model="ir.ui.view">
2181             <field name="name">account.chart.template.form</field>
2182             <field name="model">account.chart.template</field>
2183             <field name="type">form</field>
2184             <field name="arch" type="xml">
2185                 <form string="Chart of Accounts Template">
2186                     <group>
2187                     <field name="name"/>
2188                     <field name="account_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
2189                     <field name="bank_account_view_id" attrs="{'required': [('parent_id', '=', False)]}"/>
2190                     <field name="tax_code_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
2191                     <field name="parent_id" />
2192                     <!--<field name="code_digits" />-->
2193                     <field name="visible" />
2194                     <field name="complete_tax_set" />
2195                     </group>
2196                     <field name="tax_template_ids" colspan="4" readonly="1" nolabel="1"/>
2197                     <separator string="Properties" colspan="4"/>
2198                     <group>
2199                     <field name="property_account_receivable" domain="[('id', 'child_of', [account_root_id])]"/>
2200                     <field name="property_account_payable" domain="[('id', 'child_of', [account_root_id])]"/>
2201                     <field name="property_account_expense_categ" domain="[('id', 'child_of', [account_root_id])]"/>
2202                     <field name="property_account_income_categ" domain="[('id', 'child_of', [account_root_id])]" />
2203                     <field name="property_account_expense" domain="[('id', 'child_of', [account_root_id])]"/>
2204                     <field name="property_account_income" domain="[('id', 'child_of', [account_root_id])]"/>
2205                     <field name="property_account_income_opening" domain="[('id', 'child_of', [account_root_id])]"/>
2206                     <field name="property_account_expense_opening" domain="[('id', 'child_of', [account_root_id])]"/>
2207                     <field name="property_reserve_and_surplus_account" />
2208                     </group>
2209                 </form>
2210             </field>
2211         </record>
2212         <record id="view_account_chart_template_seacrh" model="ir.ui.view">
2213             <field name="name">account.chart.template.search</field>
2214             <field name="model">account.chart.template</field>
2215             <field name="type">search</field>
2216             <field name="arch" type="xml">
2217                 <search string="Search Chart of Account Templates">
2218                       <group>
2219                           <field name="name"/>
2220                         <field name="account_root_id"/>
2221                         <field name="bank_account_view_id"/>
2222                       </group>
2223                       <newline/>
2224                       <group expand="0" string="Group By...">
2225                         <filter string="Root Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'account_root_id'}"/>
2226                         <filter string="Bank Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'bank_account_view_id'}"/>
2227                         <separator orientation="vertical"/>
2228                         <filter string="Receivable Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_receivable'}"/>
2229                         <filter string="Payable Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_payable'}"/>
2230                         <separator orientation="vertical"/>
2231                         <filter string="Income Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_income_categ'}"/>
2232                         <filter string="Expense Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_expense_categ'}"/>
2233                       </group>
2234                 </search>
2235             </field>
2236         </record>
2237         <record id="view_account_chart_template_tree" model="ir.ui.view">
2238             <field name="name">account.chart.template.tree</field>
2239             <field name="model">account.chart.template</field>
2240             <field name="type">tree</field>
2241             <field name="arch" type="xml">
2242                 <tree string="Chart of Accounts Template">
2243                     <field name="name"/>
2244                     <field name="account_root_id"/>
2245                     <field name="tax_code_root_id"/>
2246                     <field name="bank_account_view_id"/>
2247                     <field name="property_account_receivable" invisible="1"/>
2248                     <field name="property_account_payable" invisible="1"/>
2249                     <field name="property_account_expense_categ" invisible="1"/>
2250                     <field name="property_account_income_categ" invisible="1"/>
2251                 </tree>
2252             </field>
2253         </record>
2254         <record id="action_account_chart_template_form" model="ir.actions.act_window">
2255             <field name="name">Chart of Accounts Templates</field>
2256             <field name="res_model">account.chart.template</field>
2257             <field name="view_type">form</field>
2258             <field name="view_mode">tree,form</field>
2259         </record>
2260
2261         <menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_accounts" sequence="1"/>
2262
2263         <!-- Account Tax Templates -->
2264
2265         <record id="view_account_tax_template_form" model="ir.ui.view">
2266             <field name="name">account.tax.template.form</field>
2267             <field name="model">account.tax.template</field>
2268             <field name="type">form</field>
2269             <field name="arch" type="xml">
2270                 <form string="Account Tax Template">
2271                     <group colspan="4">
2272                         <field name="name"/>
2273                         <field name="description"/>
2274                         <newline/>
2275                         <field name="chart_template_id"/>
2276                         <field name="type"/>
2277                         <field name="type_tax_use"/>
2278                         <group colspan="2" col="4">
2279                             <field name="price_include"/>
2280                         </group>
2281                     </group>
2282                     <notebook colspan="4">
2283                         <page string="Tax Definition">
2284                             <field name="applicable_type"/>
2285                             <field name="amount" attrs="{'readonly':[('type','=','none'),('type','=','code')]}"/>
2286                             <field groups="base.group_extended" name="include_base_amount"/>
2287                             <field groups="base.group_extended" name="domain"/>
2288                             <newline/>
2289                             <field name="account_collected_id"/>
2290                             <label colspan="2" nolabel="1" string="Keep empty to use the income account"/>
2291                             <field name="account_paid_id"/>
2292                             <label colspan="2" nolabel="1" string="Keep empty to use the expense account"/>
2293                             <field groups="base.group_extended" name="child_depend"/>
2294                             <field groups="base.group_extended" name="sequence"/>
2295                         </page>
2296                         <page string="Tax Declaration">
2297                             <separator colspan="4" string="Invoices"/>
2298                             <field name="base_code_id"/>
2299                             <field name="base_sign"/>
2300                             <field name="tax_code_id"/>
2301                             <field name="tax_sign"/>
2302
2303                             <separator colspan="4" string="Credit Notes"/>
2304                             <field name="ref_base_code_id"/>
2305                             <field name="ref_base_sign"/>
2306                             <field name="ref_tax_code_id"/>
2307                             <field name="ref_tax_sign"/>
2308                         </page>
2309                         <page groups="base.group_extended" string="Special Computation">
2310                             <separator colspan="4" string="Compute Code (if type=code)"/>
2311                             <field colspan="4" name="python_compute" nolabel="1" attrs="{'readonly':[('type','!=','code')]}"/>
2312                             <separator colspan="4" string="Compute Code for Taxes included prices"/>
2313                             <field colspan="4" name="python_compute_inv" nolabel="1"/>
2314                             <separator colspan="4" string="Applicable Code (if type=code)"/>
2315                             <field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')]}"/>
2316                         </page>
2317                     </notebook>
2318                 </form>
2319             </field>
2320         </record>
2321         <record id="view_account_tax_template_tree" model="ir.ui.view">
2322             <field name="name">account.tax.template.tree</field>
2323             <field name="model">account.tax.template</field>
2324             <field name="type">tree</field>
2325             <field name="arch" type="xml">
2326                 <tree string="Account Tax Template">
2327                     <field name="name" />
2328                     <field name="description"/>
2329                 </tree>
2330             </field>
2331         </record>
2332         <record id="view_account_tax_template_search" model="ir.ui.view">
2333             <field name="name">account.tax.template.search</field>
2334             <field name="model">account.tax.template</field>
2335             <field name="type">search</field>
2336             <field name="arch" type="xml">
2337                 <search string="Search Tax Templates">
2338                     <group>
2339                         <filter icon="terp-sale" string="Sale" domain="[('type_tax_use','=','sale')]" help="Taxes used in Sales"/>
2340                         <filter icon="terp-purchase" string="Purchase" domain="[('type_tax_use','=','purchase')]" help="Taxes used in Purchases"/>
2341                         <separator orientation="vertical"/>
2342                         <field name="name"/>
2343                         <field name="description"/>
2344                         <field name="chart_template_id"/>
2345                     </group>
2346                 </search>
2347             </field>
2348         </record>
2349
2350         <record id="action_account_tax_template_form" model="ir.actions.act_window">
2351             <field name="name">Tax Templates</field>
2352             <field name="res_model">account.tax.template</field>
2353             <field name="view_type">form</field>
2354             <field name="view_mode">tree,form</field>
2355             <field name="search_view_id" ref="view_account_tax_template_search"/>
2356         </record>
2357
2358         <menuitem action="action_account_tax_template_form" id="menu_action_account_tax_template_form" parent="account_template_taxes" sequence="13"/>
2359
2360         <!-- Account Tax Code Templates -->
2361         <record id="view_tax_code_template_tree" model="ir.ui.view">
2362             <field name="name">account.tax.code.template.tree</field>
2363             <field name="model">account.tax.code.template</field>
2364             <field name="type">tree</field>
2365             <field name="field_parent">child_ids</field>
2366             <field name="arch" type="xml">
2367                 <tree string="Account Tax Code Template" toolbar="1">
2368                     <field name="name"/>
2369                     <field name="code"/>
2370                     <field name="parent_id" invisible="1"/>
2371                 </tree>
2372             </field>
2373         </record>
2374
2375         <record id="view_tax_code_template_search" model="ir.ui.view">
2376             <field name="name">account.tax.code.template.search</field>
2377             <field name="model">account.tax.code.template</field>
2378             <field name="type">search</field>
2379             <field name="arch" type="xml">
2380                 <search string="Search tax template">
2381                     <group>
2382                         <field name="name"/>
2383                         <field name="code"/>
2384                         <field name="parent_id"/>
2385                     </group>
2386                     <newline/>
2387                     <group expand="0" string="Group By...">
2388                         <filter string="Parent Code" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
2389                     </group>
2390                 </search>
2391             </field>
2392         </record>
2393
2394         <record id="view_tax_code_template_form" model="ir.ui.view">
2395             <field name="name">account.tax.code.template.form</field>
2396             <field name="model">account.tax.code.template</field>
2397             <field name="type">form</field>
2398             <field name="arch" type="xml">
2399                 <form string="Account Tax Code Template">
2400                     <field name="name" select="1"/>
2401                     <field name="code" select="1"/>
2402                     <field name="parent_id" select="1"/>
2403                     <field name="sign"/>
2404                     <newline/>
2405                     <separator string="Description" colspan="4"/>
2406                     <field colspan="4" name="info" nolabel="1"/>
2407                 </form>
2408             </field>
2409         </record>
2410
2411         <record id="action_account_tax_code_template_form" model="ir.actions.act_window">
2412             <field name="name">Tax Code Templates</field>
2413             <field name="res_model">account.tax.code.template</field>
2414             <field name="view_type">form</field>
2415             <field name="view_mode">tree,form</field>
2416             <field name="search_view_id" ref="view_tax_code_template_search"/>
2417         </record>
2418         <menuitem action="action_account_tax_code_template_form" id="menu_action_account_tax_code_template_form" parent="account_template_taxes" sequence="14"/>
2419
2420
2421         <!--  Wizard for Multi Charts of Accounts -->
2422
2423         <record id="view_wizard_multi_chart" model="ir.ui.view">
2424             <field name="name">Generate Chart of Accounts from a Chart Template</field>
2425             <field name="model">wizard.multi.charts.accounts</field>
2426             <field name="type">form</field>
2427             <field name="inherit_id" ref="base.res_config_view_base"/>
2428             <field name="arch" type="xml">
2429               <data>
2430                 <form position="attributes">
2431                   <attribute name="string">Accounting Application Configuration</attribute>
2432                 </form>
2433                 <separator string="title" position="attributes">
2434                 <attribute name="string">Generate Your Chart of Accounts from a Chart Template</attribute>
2435                   </separator>
2436                   <xpath expr="//label[@string='description']" position="attributes">
2437                     <attribute name="string">This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template</attribute>
2438                     <attribute name="width">150</attribute>
2439                   </xpath>
2440                   <xpath expr='//separator[@string="vsep"]' position='attributes'>
2441                           <attribute name='rowspan'>15</attribute>
2442                           <attribute name='string'></attribute>
2443                   </xpath>
2444                 <group string="res_config_contents" position="replace">
2445                     <field name="company_id" widget="selection"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
2446                     <field name ="code_digits" groups="account.group_account_user"/>
2447                     <field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
2448                     <field name ="seq_journal" groups="base.group_extended"/>
2449                     <field name="sale_tax" attrs="{'invisible': [('complete_tax_set', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
2450                     <field name="purchase_tax" attrs="{'invisible': [('complete_tax_set', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
2451                     <newline/>
2452                     <field name ="sale_tax_rate" attrs="{'invisible': [('complete_tax_set', '=', True)]}" on_change="onchange_tax_rate(sale_tax_rate)"/>
2453                     <field name ="purchase_tax_rate" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>
2454                     <field name ="complete_tax_set" invisible="1"/>
2455                     <newline/> <!-- extended view because the web UI is not good for one2many -->
2456                     <field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list" groups="account.group_account_user">
2457                         <form string="Bank Information">
2458                             <field name="acc_name"/>
2459                             <field name="account_type"/>
2460                             <field name="currency_id" widget="selection" groups="base.group_extended"/>
2461                         </form>
2462                         <tree editable="bottom" string="Bank Information">
2463                             <field name="acc_name"/>
2464                             <field name="account_type"/>
2465                             <field name="currency_id" widget="selection" groups="base.group_extended"/>
2466                         </tree>
2467                     </field>
2468                 </group>
2469               </data>
2470             </field>
2471         </record>
2472
2473         <record id="action_wizard_multi_chart" model="ir.actions.act_window">
2474             <field name="name">Generate Chart of Accounts from a Chart Template</field>
2475             <field name="type">ir.actions.act_window</field>
2476             <field name="res_model">wizard.multi.charts.accounts</field>
2477             <field name="view_id" ref="view_wizard_multi_chart"/>
2478             <field name="view_type">form</field>
2479             <field name="view_mode">form</field>
2480             <field name="target">new</field>
2481         </record>
2482         <record id="ir_actions_server_action_wizard_multi_chart" model="ir.actions.server">
2483             <field name="type">ir.actions.server</field>
2484             <field name="condition">True</field>
2485             <field name="state">code</field>
2486             <field name="model_id" ref="base.model_ir_actions_todo"/>
2487             <field eval="5" name="sequence"/>
2488             <field name="code">
2489 # check for unconfigured companies
2490 account_installer_obj = self.pool.get('account.installer')
2491 account_installer_obj.check_unconfigured_cmp(cr, uid, context=context)
2492 action_ids = []
2493 # fetch the act_window actions related to chart of account configuration
2494 # we use ir.actions.todo to enable the possibility for other modules to insert their own
2495 # wizards during the configuration process
2496 ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'action_wizard_multi_chart')
2497 if ref:
2498     action_ids += [ref[1]]
2499 ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'action_account_configuration_installer')
2500 if ref:
2501     action_ids += [ref[1]]
2502 todo_ids = pool.get('ir.actions.todo').search(cr, uid, [('action_id', 'in', action_ids)], context=context)
2503 pool.get('ir.actions.todo').write(cr, uid, todo_ids, {'state':'open'}, context=context)
2504 action = pool.get('res.config').next(cr, uid, [], context)
2505 </field>
2506            <field name="name">New Company Financial Setting</field>
2507         </record>
2508
2509
2510         <record id="menu_act_ir_actions_bleble" model="ir.ui.menu">
2511             <field name="name">New Company Financial Setting</field>
2512             <field eval="1" name="sequence"/>
2513             <field name="parent_id" ref="account.menu_finance_accounting"/>
2514             <field name="icon">STOCK_EXECUTE</field>
2515             <field name="action" ref="ir_actions_server_action_wizard_multi_chart"/>
2516         </record>
2517
2518         <record id="account_account_graph" model="ir.ui.view">
2519             <field name="name">account.account.graph</field>
2520             <field name="model">account.account</field>
2521             <field name="type">graph</field>
2522             <field name="arch" type="xml">
2523                 <graph string="Account Statistics" type="bar">
2524                     <field name="name"/>
2525                     <field name="balance" operator="+"/>
2526                 </graph>
2527             </field>
2528          </record>
2529
2530          <!-- Fiscal Position Templates -->
2531
2532         <record id="view_account_position_template_search" model="ir.ui.view">
2533             <field name="name">account.fiscal.position.template.search</field>
2534             <field name="model">account.fiscal.position.template</field>
2535             <field name="type">search</field>
2536             <field name="arch" type="xml">
2537                 <search string="Fiscal Position">
2538                     <field name="name"/>
2539                 </search>
2540             </field>
2541         </record>
2542
2543         <record id="view_account_position_template_form" model="ir.ui.view">
2544             <field name="name">account.fiscal.position.template.form</field>
2545             <field name="model">account.fiscal.position.template</field>
2546             <field name="type">form</field>
2547             <field name="arch" type="xml">
2548                 <form string="Fiscal Position Template">
2549                     <field name="name"/>
2550                     <field name="chart_template_id"/>
2551                     <newline/>
2552                     <field name="tax_ids" colspan="4" nolabel="1">
2553                         <tree string="Taxes Mapping" editable="bottom">
2554                             <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
2555                             <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
2556                         </tree>
2557                         <form string="Taxes Mapping">
2558                             <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
2559                             <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
2560                         </form>
2561                     </field>
2562                     <field name="account_ids" colspan="4" nolabel="1">
2563                         <tree string="Accounts Mapping" editable="bottom">
2564                             <field name="account_src_id"/>
2565                             <field name="account_dest_id"/>
2566                         </tree>
2567                         <form string="Accounts Mapping">
2568                             <field name="account_src_id"/>
2569                             <field name="account_dest_id"/>
2570                         </form>
2571                     </field>
2572                 </form>
2573             </field>
2574         </record>
2575         <record id="view_account_position_template_tree" model="ir.ui.view">
2576             <field name="name">account.fiscal.position.template.tree</field>
2577             <field name="model">account.fiscal.position.template</field>
2578             <field name="type">tree</field>
2579             <field name="arch" type="xml">
2580                 <tree string="Fiscal Position">
2581                     <field name="name"/>
2582                 </tree>
2583             </field>
2584         </record>
2585
2586         <record id="action_account_fiscal_position_template_form" model="ir.actions.act_window">
2587             <field name="name">Fiscal Position Templates</field>
2588             <field name="res_model">account.fiscal.position.template</field>
2589             <field name="view_type">form</field>
2590             <field name="view_mode">tree,form</field>
2591             <field name="search_view_id" ref="view_account_position_template_search"/>
2592         </record>
2593
2594         <menuitem
2595             action="action_account_fiscal_position_template_form"
2596             id="menu_action_account_fiscal_position_form_template"
2597             parent="account_template_taxes" sequence="20"/>
2598
2599         <!-- Cash Statement -->
2600         <record id="view_cash_statement_tree" model="ir.ui.view">
2601             <field name="name">account.bank.statement.tree</field>
2602             <field name="model">account.bank.statement</field>
2603             <field name="type">tree</field>
2604             <field name="arch" type="xml">
2605                 <tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end);black:state == 'open'" string="Statement">
2606                     <field name="name"/>
2607                     <field name="date"/>
2608                     <field name="period_id"/>
2609                     <field name="journal_id"/>
2610                     <field name="balance_start"/>
2611                     <field name="balance_end_real"/>
2612                     <field name="balance_end"/>
2613                     <field name="state"/>
2614                     <button type="object" string="Cancel" name="button_cancel" states="confirm" icon="gtk-cancel"/>
2615                     <button type="object" string="Open" name="button_open" states="draft" icon="terp-camera_test"/>
2616                     <button type="object" string="Confirm" name="button_confirm_bank" states="open" icon="terp-gtk-go-back-rtl"/>
2617                 </tree>
2618             </field>
2619         </record>
2620
2621         <record id="view_bank_statement_form2" model="ir.ui.view">
2622             <field name="name">account.bank.statement.form</field>
2623             <field name="model">account.bank.statement</field>
2624             <field name="type">form</field>
2625             <field name="arch" type="xml">
2626                 <form string="Statement">
2627                     <group col="6" colspan="4">
2628                         <field name="name" select="1"/>
2629                         <field name='company_id' widget="selection" groups="base.group_multi_company" />
2630                         <field name="journal_id" on_change="onchange_journal_id(journal_id)" select="1" widget="selection"/>
2631                         <field name="user_id" select="1" readonly="1"/>
2632                         <field name="period_id" select="1"/>
2633                         <field name="currency" invisible="1"/>
2634                     </group>
2635
2636                     <notebook colspan="4">
2637                         <page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
2638                             <field colspan="4" name="line_ids" nolabel="1" context="{'date':date}">
2639                                 <tree editable="bottom" string="Statement lines">
2640                                     <field name="sequence" invisible="1"/>
2641                                     <field name="date" groups="base.group_extended"/>
2642                                     <field name="name"/>
2643                                     <field name="ref"/>
2644                                     <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
2645                                     <field name="type" on_change="onchange_type(partner_id, type)"/>
2646                                     <field domain="[('journal_id','=',parent.journal_id), ('company_id', '=', parent.company_id)]" name="account_id"/>
2647                                     <field name="analytic_account_id" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]" groups="analytic.group_analytic_accounting" />
2648                                     <field name="amount"/>
2649                                     <field name="state" invisible="1"/>
2650                                 </tree>
2651                                 <form string="Statement lines">
2652                                     <field name="date"/>
2653                                     <field name="name"/>
2654                                     <field name="ref"/>
2655                                     <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
2656                                     <field name="type" on_change="onchange_type(partner_id, type)"/>
2657                                     <field domain="[('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view'), ('company_id', '=', parent.company_id)]" name="account_id"/>
2658                                     <field name="analytic_account_id" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]" groups="analytic.group_analytic_accounting" />
2659                                     <field name="amount"/>
2660                                     <field name="sequence"/>
2661                                     <separator colspan="4" string="Notes"/>
2662                                     <field colspan="4" name="note" nolabel="1"/>
2663                                     <field name="state" invisible="1"/>
2664                                 </form>
2665                             </field>
2666                         </page>
2667                         <page string="CashBox">
2668                             <group col="2" colspan="2" expand="1">
2669                                 <field name="starting_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','!=','draft')]}">
2670                                     <tree string = "Opening Balance" editable="bottom">
2671                                         <field name="pieces"/>
2672                                         <field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
2673                                         <field name="subtotal" sum="Total"/>
2674                                     </tree>
2675                                     <form string = "Opening Balance">
2676                                         <field name="pieces"/>
2677                                         <field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
2678                                         <field name="subtotal"/>
2679                                     </form>
2680                                 </field>
2681                             </group>
2682                             <group col="2" colspan="2" expand="1">
2683                                 <field name="ending_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','!=','open')]}">
2684                                     <tree string = "Closing Balance" editable="bottom">
2685                                         <field name="pieces"/>
2686                                         <field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
2687                                         <field name="subtotal" sum="Total"/>
2688                                     </tree>
2689                                     <form string = "Closing Balance">
2690                                         <field name="pieces"/>
2691                                         <field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
2692                                         <field name="subtotal"/>
2693                                     </form>
2694                                 </field>
2695                             </group>
2696                         </page>
2697                         <page string="Journal Entries" attrs="{'invisible': [('state','!=','confirm')]}">
2698                             <field colspan="4" name="move_line_ids" nolabel="1" string="Journal Entries"/>
2699                         </page>
2700                     </notebook>
2701                     <group col="6" colspan="4">
2702                         <group col="2" colspan="2">
2703                             <separator string="Dates" colspan="4"/>
2704                             <field name="date" select="1" attrs="{'readonly':[('state','!=','draft')]}"  on_change="onchange_date(date, company_id)"/>
2705                             <field name="closing_date" select="1" readonly="1"/>
2706                         </group>
2707                         <group col="2" colspan="2">
2708                             <separator string="Opening Balance" colspan="4"/>
2709                             <field name="balance_start" readonly="1" string="Opening Balance"/>
2710                             <field name="total_entry_encoding"/>
2711                         </group>
2712                         <group col="2" colspan="2">
2713                             <separator string="Closing Balance" colspan="4"/>
2714                             <field name="balance_end"/>
2715                             <field name="balance_end_cash"/>
2716                         </group>
2717                     </group>
2718                     <group col="8" colspan="4">
2719                         <field name="state" widget="statusbar" statusbar_visible="draft,confirm" colspan="4"/>
2720                         <button name="button_cancel" states="confirm,open" string="Cancel" icon="terp-gtk-stop" type="object" groups="base.group_extended"/>
2721                         <button name="button_confirm_cash" states="open" string="Close CashBox" icon="terp-dialog-close" type="object"/>
2722                         <button name="button_open" states="draft" string="Open CashBox" icon="gtk-go-forward" type="object"/>
2723                     </group>
2724                 </form>
2725             </field>
2726         </record>
2727         <record id="account_cash_statement_graph" model="ir.ui.view">
2728             <field name="name">account.bank.statement.graph</field>
2729             <field name="model">account.bank.statement</field>
2730             <field name="type">graph</field>
2731             <field name="arch" type="xml">
2732                 <graph string="Account Statistics" type="bar">
2733                     <field name="date"/>
2734                     <field name="balance_start" operator="+"/>
2735                     <field name="balance_end" operator="+"/>
2736                 </graph>
2737             </field>
2738          </record>
2739         <record id="action_view_bank_statement_tree" model="ir.actions.act_window">
2740             <field name="name">Cash Registers</field>
2741             <field name="type">ir.actions.act_window</field>
2742             <field name="res_model">account.bank.statement</field>
2743             <field name="view_type">form</field>
2744             <field name="view_mode">tree,form,graph</field>
2745             <field name="view_id" ref="view_cash_statement_tree"/>
2746             <field name="search_view_id" ref="view_account_bank_statement_filter"/>
2747             <field name="domain">[('journal_id.type', '=', 'cash')]</field>
2748             <field name="context">{'journal_type':'cash'}</field>
2749             <field name="help">A Cash Register allows you to manage cash entries in your cash journals. This feature provides an easy way to follow up cash payments on a daily basis. You can enter the coins that are in your cash box, and then post entries when money comes in or goes out of the cash box.</field>
2750         </record>
2751         <record model="ir.actions.act_window.view" id="act_cash_statement1_all">
2752             <field name="sequence" eval="1"/>
2753             <field name="view_mode">tree</field>
2754             <field name="view_id" ref="view_cash_statement_tree"/>
2755             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2756         </record>
2757         <record model="ir.actions.act_window.view" id="act_cash_statement2_all">
2758             <field name="sequence" eval="1"/>
2759             <field name="view_mode">form</field>
2760             <field name="view_id" ref="view_bank_statement_form2"/>
2761             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2762         </record>
2763         <record model="ir.actions.act_window.view" id="act_cash_statement3_all">
2764             <field name="sequence" eval="1"/>
2765             <field name="view_mode">graph</field>
2766             <field name="view_id" ref="account_cash_statement_graph"/>
2767             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2768         </record>
2769         <menuitem action="action_view_bank_statement_tree" id="journal_cash_move_lines"
2770             parent="menu_finance_bank_and_cash"/>
2771
2772         <menuitem id="menu_account_customer" name="Customers"
2773             parent="menu_finance_receivables"
2774             action="base.action_partner_customer_form" sequence="100"/>
2775
2776         <menuitem id="menu_account_supplier" name="Suppliers"
2777             parent="menu_finance_payables"
2778             action="base.action_partner_supplier_form" sequence="100"/>
2779
2780         <!--
2781             Account Reports
2782         -->
2783
2784         <record id="view_account_financial_report_form" model="ir.ui.view">
2785             <field name="name">account.financial.report.form</field>
2786             <field name="model">account.financial.report</field>
2787             <field name="type">form</field>
2788             <field name="arch" type="xml">
2789                 <form string="Account Report">
2790                     <group col="6" colspan="4">
2791                         <field name="name"/>
2792                         <field name="parent_id"/>
2793                         <field name="sequence"/>
2794                         <field name="type"/>
2795                         <field name="sign"/>
2796                         <field name="style_overwrite"/>
2797                     </group>
2798                     <notebook colspan="6">
2799                         <page string="Report">
2800                             <group colspan="4" col="4">
2801                                 <field name="display_detail" attrs="{'invisible': [('type','not in',['accounts','account_type'])]}"  colspan="2"/>
2802                                 <label string="" colspan="2"/>
2803                             </group>
2804                             <newline/>
2805                             <field name="account_ids" nolabel="1" colspan="6" attrs="{'invisible': [('type', '!=', 'accounts')]}"/>
2806                             <newline/>
2807                             <field name="account_report_id" attrs="{'invisible': [('type', '!=', 'account_report')]}"/>
2808                             <newline/>
2809                             <field name="account_type_ids" nolabel="1" attrs="{'invisible': [('type', '!=', 'account_type')]}"/>
2810                             <newline/>
2811                         </page>
2812                     </notebook>
2813                 </form>
2814             </field>
2815         </record>
2816
2817         <record id="view_account_financial_report_tree" model="ir.ui.view">
2818             <field name="name">account.financial.report.tree</field>
2819             <field name="model">account.financial.report</field>
2820             <field name="type">tree</field>
2821             <field name="arch" type="xml">
2822                 <tree string="Account Report">
2823                     <field name="name"/>
2824                     <field name="parent_id" invisible="1"/>
2825                     <field name="type"/>
2826                     <field name="account_report_id"/>
2827                 </tree>
2828             </field>
2829         </record>
2830
2831         <record id="view_account_financial_report_search" model="ir.ui.view">
2832             <field name="name">account.financial.report.search</field>
2833             <field name="model">account.financial.report</field>
2834             <field name="type">search</field>
2835             <field name="arch" type="xml">
2836                 <search string="Account Report">
2837                     <group>
2838                         <field name="name"/>
2839                         <field name="type"/>
2840                         <field name="account_report_id"/>
2841                     </group>
2842                     <newline/>
2843                     <group expand="0" string="Group By...">
2844                         <filter string="Parent Report" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
2845                         <separator orientation="vertical"/>
2846                         <filter string="Report Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
2847                     </group>
2848                 </search>
2849             </field>
2850         </record>
2851
2852         <record id="action_account_financial_report_tree" model="ir.actions.act_window">
2853             <field name="name">Financial Reports</field>
2854             <field name="type">ir.actions.act_window</field>
2855             <field name="res_model">account.financial.report</field>
2856             <field name="view_type">form</field>
2857             <field name="view_mode">tree,form</field>
2858             <field name="search_view_id" ref="view_account_financial_report_search"/>
2859             <field name="view_id" ref="view_account_financial_report_tree"/>
2860             <field name="help">Makes a generic system to draw financial reports easily.</field>
2861         </record>
2862
2863         <menuitem id="menu_account_financial_reports_tree" name="Account Reports" parent="menu_account_reports" action="action_account_financial_report_tree"/>
2864
2865         <record id="view_account_report_tree_hierarchy" model="ir.ui.view">
2866             <field name="name">account.report.hierarchy</field>
2867             <field name="model">account.financial.report</field>
2868             <field name="type">tree</field>
2869             <field name="field_parent">children_ids</field>
2870             <field name="arch" type="xml">
2871                 <tree string="Account Reports Hierarchy">
2872                     <field name="name"/>
2873                     <field name="type"/>
2874                     <field name="parent_id" invisible="1"/>
2875                     <field name="account_report_id"/>
2876                 </tree>
2877             </field>
2878         </record>
2879         <record id="action_account_report_tree_hierarchy" model="ir.actions.act_window">
2880             <field name="name">Financial Reports Hierarchy</field>
2881             <field name="res_model">account.financial.report</field>
2882             <field name="view_type">tree</field>
2883             <field name="view_id" ref="view_account_report_tree_hierarchy"/>
2884             <field name="domain">[('parent_id','=',False)]</field>
2885         </record>
2886
2887         <menuitem id="menu_account_report_tree_hierarchy" name="Account Reports Hierarchy"
2888                   parent="menu_account_reports" action="action_account_report_tree_hierarchy"/>
2889
2890     </data>
2891 </openerp>