[FIX] account: Remove the button to load the definition of the currencies in the...
[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_configuration" sequence="5" />
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" groups="base.group_no_one"/>
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="account.menu_finance_configuration" sequence="15"/>
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                         <page string="Cash Box">
508                             <field name="cashbox_line_ids" nolabel="1" string="Unit Of Currency Definition">
509                                 <tree string="CashBox Lines" editable="bottom">
510                                     <field name="pieces" />
511                                 </tree>
512                             </field>
513                         </page>
514                     </notebook>
515                 </form>
516             </field>
517         </record>
518         <record id="action_account_journal_form" model="ir.actions.act_window">
519             <field name="name">Journals</field>
520             <field name="res_model">account.journal</field>
521             <field name="view_type">form</field>
522             <field name="view_mode">tree,form</field>
523             <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>
524         </record>
525         <menuitem action="action_account_journal_form" id="menu_action_account_journal_form" parent="menu_journals"/>
526
527         <record id="view_account_bank_statement_filter" model="ir.ui.view">
528             <field name="name">account.cash.statement.select</field>
529             <field name="model">account.bank.statement</field>
530             <field name="type">search</field>
531             <field name="arch" type="xml">
532                 <search string="Search Bank Statements">
533                     <group>
534                         <filter string="Draft" name="state_draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
535                         <filter string="Open" name="state_open" domain="[('state','=','open')]" icon="terp-check"/>
536                         <filter string="Confirmed" name="state_confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
537                         <separator orientation="vertical"/>
538                         <field name="date"/>
539                         <field name="name"/>
540                         <field name="journal_id" widget='selection' domain="[('type', '=', 'cash')]" />
541                     </group>
542                     <newline/>
543                     <group expand="0" string="Group By...">
544                         <filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
545                         <filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
546                         <separator orientation="vertical"/>
547                         <filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
548                     </group>
549                 </search>
550             </field>
551         </record>
552
553         <record id="view_bank_statement_tree" model="ir.ui.view">
554             <field name="name">account.bank.statement.tree</field>
555             <field name="model">account.bank.statement</field>
556             <field name="type">tree</field>
557             <field name="arch" type="xml">
558                 <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">
559                     <field name="name"/>
560                     <field name="date"/>
561                     <field name="period_id"/>
562                     <field name="journal_id"/>
563                     <field name="balance_start"/>
564                     <field name="balance_end_real"/>
565                     <field name="balance_end" invisible="1"/>
566                     <field name="state"/>
567                     <button type="object" string="Cancel" name="button_cancel" states="confirm" icon="gtk-cancel"/>
568                     <button type="object" string="Confirm" name="button_confirm_bank" states="draft" icon="terp-camera_test"/>
569                 </tree>
570             </field>
571         </record>
572         <record id="view_bank_statement_search" model="ir.ui.view">
573             <field name="name">account.bank.statement.search</field>
574             <field name="model">account.bank.statement</field>
575             <field name="type">search</field>
576             <field name="arch" type="xml">
577                 <search string="Search Bank Statements">
578                     <group>
579                         <filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
580                         <filter string="Confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
581                         <separator orientation="vertical"/>
582                         <field name="name"/>
583                         <field name="date"/>
584                         <field name="period_id"/>
585                         <field name="journal_id" widget="selection" domain="[('type', '=', 'bank')]" />
586                     </group>
587                     <newline/>
588                     <group expand="0" string="Group By...">
589                         <filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
590                         <filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
591                         <separator orientation="vertical"/>
592                         <filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
593                     </group>
594                 </search>
595             </field>
596         </record>
597         <record id="view_bank_statement_form" model="ir.ui.view">
598             <field name="name">account.bank.statement.form</field>
599             <field name="model">account.bank.statement</field>
600             <field name="type">form</field>
601             <field name="arch" type="xml">
602                 <form string="Bank Statement">
603                     <group col="7" colspan="4">
604                         <field name="name" select="1"/>
605                         <field name="date" select="1" on_change="onchange_date(date, company_id)"/>
606                         <field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" select="1" widget="selection"/>
607                         <newline/>
608                         <field name="period_id"/>
609                         <field name="balance_start"/>
610                         <field name="balance_end_real"/>
611                         <field name="currency" invisible="1"/>
612                         <field name='company_id' widget="selection" groups="base.group_multi_company" />
613                     </group>
614                     <notebook colspan="4">
615                         <page string="Transaction" name="statement_line_ids">
616                             <field colspan="4" name="line_ids" nolabel="1" context="{'date':date}">
617                                 <tree editable="bottom" string="Statement lines">
618                                     <field name="sequence" readonly="1" invisible="1"/>
619                                     <field name="date" groups="base.group_extended"/>
620                                     <field name="name"/>
621                                     <field name="ref"/>
622                                     <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
623                                     <field name="type" on_change="onchange_type(partner_id, type)"/>
624                                     <field domain="[('journal_id','=',parent.journal_id), ('company_id', '=', parent.company_id)]" name="account_id"/>
625                                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]"/>
626                                     <field name="amount"/>
627                                 </tree>
628                                 <form string="Statement lines">
629                                     <field name="date"/>
630                                     <field name="name"/>
631                                     <field name="ref"/>
632                                     <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
633                                     <field name="type" on_change="onchange_type(partner_id, type)"/>
634                                     <field domain="[('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view'), ('company_id', '=', parent.company_id)]" name="account_id"/>
635                                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]"/>
636                                     <field name="amount"/>
637                                     <field name="sequence" readonly="0"/>
638                                     <separator colspan="4" string="Notes"/>
639                                     <field colspan="4" name="note" nolabel="1"/>
640                                 </form>
641                             </field>
642                         </page>
643                         <page string="Journal Entries" name="move_live_ids">
644                             <field colspan="4" name="move_line_ids" nolabel="1"/>
645                         </page>
646                     </notebook>
647                     <group col="8" colspan="4">
648                         <field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
649                         <field name="balance_end"/>
650                         <button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
651                         <button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
652                         <button name="button_confirm_bank" states="draft" string="Confirm" type="object"  icon="terp-camera_test"/>
653                     </group>
654                 </form>
655             </field>
656         </record>
657
658         <record id="view_bank_statement_periodic_form" model="ir.ui.view">
659             <field name="name">account.bank.statement.reconcile.form</field>
660             <field name="model">account.bank.statement</field>
661             <field name="type">form</field>
662             <field name="arch" type="xml">
663                 <form string="Bank Statement">
664                     <group col="7" colspan="4">
665                         <field name="name" select="1"/>
666                         <field name="date" select="1" on_change="onchange_date(date, company_id)"/>
667                         <field name='company_id' widget="selection" groups="base.group_multi_company" />
668                         <field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" widget="selection"/>
669                         <newline/>
670                         <field name="period_id"/>
671                         <field name="balance_start"/>
672                         <field name="balance_end_real"/>
673                         <field name="currency" invisible="1"/>
674                         <field name="account_id" invisible="1"/>
675                     </group>
676                     <notebook colspan="4">
677                         <page string="Journal Entries">
678                             <field colspan="4" name="move_line_ids" nolabel="1" widget="many2many" domain="[('account_id','=',account_id),('statement_id', '=', False)]">
679                                 <tree string="Statement lines">
680                                     <field name="date"/>
681                                     <field name="period_id"/>
682                                     <field name="journal_id"/>
683                                     <field name="ref"/>
684                                     <field name="name"/>
685                                     <field name="account_id"/>
686                                     <field name="partner_id"/>
687                                     <field name="debit"/>
688                                     <field name="credit"/>
689                                 </tree>
690                             </field>
691                         </page>
692                     </notebook>
693                     <group col="8" colspan="4">
694                         <field name="state"/>
695                         <field name="balance_end"/>
696                         <button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
697                         <button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
698                         <button name="button_confirm_bank" states="draft" string="Confirm" type="object"  icon="terp-camera_test"/>
699                     </group>
700                 </form>
701             </field>
702         </record>
703
704         <record id="action_bank_statement_tree" model="ir.actions.act_window">
705             <field name="name">Bank Statements</field>
706             <field name="res_model">account.bank.statement</field>
707             <field name="view_type">form</field>
708             <field name="view_mode">tree,form,graph</field>
709             <field name="domain">[('journal_id.type', '=', 'bank')]</field>
710             <field name="context">{'journal_type':'bank'}</field>
711             <field name="search_view_id" ref="view_bank_statement_search"/>
712             <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>
713         </record>
714         <record model="ir.actions.act_window.view" id="action_bank_statement_tree_bank">
715             <field name="sequence" eval="1"/>
716             <field name="view_mode">tree</field>
717             <field name="view_id" ref="view_bank_statement_tree"/>
718             <field name="act_window_id" ref="action_bank_statement_tree"/>
719         </record>
720         <record model="ir.actions.act_window.view" id="action_bank_statement_form_bank">
721             <field name="sequence" eval="1"/>
722             <field name="view_mode">form</field>
723             <field name="view_id" ref="view_bank_statement_form"/>
724             <field name="act_window_id" ref="action_bank_statement_tree"/>
725         </record>
726
727     <record id="action_bank_statement_periodic_tree" model="ir.actions.act_window">
728             <field name="name">Bank Statements</field>
729             <field name="res_model">account.bank.statement</field>
730             <field name="view_type">form</field>
731             <field name="view_mode">tree,form,graph</field>
732             <field name="domain">[('journal_id.type', '=', 'bank')]</field>
733             <field name="search_view_id" ref="view_bank_statement_search"/>
734             <field name="context">{'journal_type':'bank'}</field>
735         </record>
736         <record model="ir.actions.act_window.view" id="action_bank_statement_periodic_tree_bank">
737             <field name="sequence" eval="1"/>
738             <field name="view_mode">tree</field>
739             <field name="view_id" ref="view_bank_statement_tree"/>
740             <field name="act_window_id" ref="action_bank_statement_periodic_tree"/>
741         </record>
742         <record model="ir.actions.act_window.view" id="action_bank_statement_periodic_form_bank">
743             <field name="sequence" eval="1"/>
744             <field name="view_mode">form</field>
745             <field name="view_id" ref="view_bank_statement_periodic_form"/>
746             <field name="act_window_id" ref="action_bank_statement_periodic_tree"/>
747         </record>
748
749         <menuitem string="Bank Statements" action="action_bank_statement_tree" id="menu_bank_statement_tree" parent="menu_finance_bank_and_cash" sequence="7"/>
750         <menuitem name="Statements Reconciliation" action="action_bank_statement_periodic_tree" id="menu_menu_Bank_process" parent="account.periodical_processing_reconciliation" sequence="15"/>
751
752
753         <record id="action_bank_statement_draft_tree" model="ir.actions.act_window">
754             <field name="name">Draft statements</field>
755             <field name="res_model">account.bank.statement</field>
756             <field name="view_type">form</field>
757             <field name="view_mode">tree,form</field>
758             <field name="domain">[('state','=','draft')]</field>
759             <field name="filter" eval="True"/>
760         </record>
761
762         <!--
763     Account Types
764     -->
765         <record id="view_account_type_search" model="ir.ui.view">
766             <field name="name">account.account.type.search</field>
767             <field name="model">account.account.type</field>
768             <field name="type">search</field>
769             <field name="arch" type="xml">
770                 <search string="Account Type">
771                     <field name="name"/>
772                     <field name="code"/>
773                 </search>
774             </field>
775         </record>
776
777         <record id="view_account_type_tree" model="ir.ui.view">
778             <field name="name">account.account.type.tree</field>
779             <field name="model">account.account.type</field>
780             <field name="type">tree</field>
781             <field name="arch" type="xml">
782                 <tree string="Account Type">
783                     <field name="name"/>
784                     <field name="code"/>
785                 </tree>
786             </field>
787         </record>
788
789         <record id="view_account_type_form" model="ir.ui.view">
790             <field name="name">account.account.type.form</field>
791             <field name="model">account.account.type</field>
792             <field name="type">form</field>
793             <field name="arch" type="xml">
794                 <form string="Account Type">
795                     <group col="6" colspan="4">
796                         <field name="name" select="1"/>
797                         <field name="code" select="1"/>
798                     </group>
799                     <group col="2" colspan="2">
800                         <separator string="Reporting Configuration" colspan="4"/>
801                         <field name="report_type" select="2"/>
802                     </group>
803                     <group col="2" colspan="2">
804                         <separator string="Closing Method" colspan="4"/>
805                         <field name="close_method"/>
806                     </group>
807                     <separator string="Description" colspan="4"/>
808                     <field name="note" colspan="4" nolabel="1"/>
809                 </form>
810             </field>
811         </record>
812         <record id="action_account_type_form" model="ir.actions.act_window">
813             <field name="name">Account Types</field>
814             <field name="res_model">account.account.type</field>
815             <field name="view_type">form</field>
816             <field name="view_mode">tree,form</field>
817             <field name="search_view_id" ref="view_account_type_search"/>
818             <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>
819         </record>
820         <menuitem action="action_account_type_form" sequence="20" id="menu_action_account_type_form" parent="account_account_menu" groups="base.group_no_one"/>
821         <!--
822     Entries
823     -->
824         <record id="view_account_move_tree" model="ir.ui.view">
825             <field name="name">account.move.tree</field>
826             <field name="model">account.move</field>
827             <field name="type">tree</field>
828             <field name="arch" type="xml">
829                 <tree colors="blue:state == 'draft';black:state == 'posted'" string="Journal Entries">
830                     <field name="name"/>
831                     <field name="ref"/>
832                     <field name="date"/>
833                     <field name="period_id"/>
834                     <field name="journal_id"/>
835                     <field name="partner_id"/>
836                     <field name="amount" sum="Total Amount"/>
837                     <field name="state"/>
838                 </tree>
839             </field>
840         </record>
841
842         <!--
843     Reconcile
844     -->
845
846         <record id="view_move_reconcile_form" model="ir.ui.view">
847             <field name="name">account.move.reconcile.form</field>
848             <field name="model">account.move.reconcile</field>
849             <field name="type">form</field>
850             <field name="arch" type="xml">
851                 <form string="Journal Entry Reconcile">
852                     <group col="6" colspan="4">
853                         <field name="name" select="1"/>
854                         <field name="create_date" select="1"/>
855                         <field name="type" select="1"/>
856                     </group>
857                     <separator colspan="4" string="Reconcile Entries"/>
858                     <field colspan="4" name="line_id" nolabel="1"/>
859                     <separator colspan="4" string="Partial Reconcile Entries"/>
860                     <field colspan="4" name="line_partial_ids" nolabel="1"/>
861                 </form>
862             </field>
863         </record>
864
865         <!--
866     Tax Codes
867     -->
868         <record id="view_tax_code_search" model="ir.ui.view">
869             <field name="name">account.tax.code.search</field>
870             <field name="model">account.tax.code</field>
871             <field name="type">search</field>
872             <field name="arch" type="xml">
873                 <search string="Account Tax Code">
874                     <field name="name"/>
875                     <field name="code"/>
876                     <field name="parent_id"/>
877                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
878                 </search>
879             </field>
880         </record>
881         <record id="view_tax_code_tree" model="ir.ui.view">
882             <field name="name">account.tax.code.tree</field>
883             <field name="model">account.tax.code</field>
884             <field name="type">tree</field>
885             <field name="field_parent">child_ids</field>
886             <field name="priority">100</field>
887             <field name="arch" type="xml">
888                 <tree string="Account Tax Code" toolbar="1">
889                     <field name="name"/>
890                     <field name="code"/>
891                     <field name="sum_period"/>
892                     <field name="sum"/>
893                     <field name="company_id" groups="base.group_multi_company"/>
894                 </tree>
895             </field>
896         </record>
897         <record id="view_tax_code_form" model="ir.ui.view">
898             <field name="name">account.tax.code.form</field>
899             <field name="model">account.tax.code</field>
900             <field name="type">form</field>
901             <field name="arch" type="xml">
902                 <form string="Account Tax Code">
903                     <group col="6" colspan="4">
904                         <field name="name"/>
905                         <field name="code"/>
906                         <field name="parent_id"/>
907                         <field name="company_id" groups="base.group_multi_company"/>
908                     </group>
909                     <group colspan="2" col="2">
910                         <separator string="Reporting Configuration" colspan="4"/>
911                         <field name="notprintable"/>
912                         <field name="sign"/>
913                     </group>
914                     <group colspan="2" col="2">
915                         <separator string="Statistics" colspan="4"/>
916                         <field name="sum_period"/>
917                         <field name="sum"/>
918                     </group>
919                     <separator string="Description" colspan="4"/>
920                     <field colspan="4" name="info" nolabel="1"/>
921                 </form>
922             </field>
923         </record>
924         <record id="action_tax_code_list" model="ir.actions.act_window">
925             <field name="name">Tax codes</field>
926             <field name="res_model">account.tax.code</field>
927             <field name="view_type">form</field>
928             <field name="view_mode">tree,form</field>
929             <field name="view_id" ref="view_tax_code_tree"/>
930             <field name="search_view_id" ref="view_tax_code_search"/>
931             <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>
932         </record>
933        <menuitem id="next_id_27" name="Taxes" parent="account.menu_finance_configuration" sequence="20"/>
934        <menuitem action="action_tax_code_list" id="menu_action_tax_code_list" parent="next_id_27" sequence="12" groups="base.group_no_one"/>
935
936
937         <!--
938     Tax
939     -->
940         <record id="view_tax_tree" model="ir.ui.view">
941             <field name="name">account.tax.tree</field>
942             <field name="model">account.tax</field>
943             <field name="type">tree</field>
944             <field name="field_parent">child_ids</field>
945             <field name="arch" type="xml">
946                 <tree string="Account Tax">
947                     <field name="name"/>
948                     <field name="price_include" groups="base.group_extended"/>
949                     <field name="description"/>
950                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
951                 </tree>
952             </field>
953         </record>
954         <record id="view_account_tax_search" model="ir.ui.view">
955             <field name="name">account.tax.search</field>
956             <field name="model">account.tax</field>
957             <field name="type">search</field>
958             <field name="arch" type="xml">
959                 <search string="Search Taxes">
960                     <group>
961                         <field name="name"/>
962                         <field name="description"/>
963                         <field name="company_id" widget="selection" groups="base.group_multi_company"/>
964                     </group>
965                 </search>
966             </field>
967         </record>
968         <record id="view_tax_form" model="ir.ui.view">
969             <field name="name">account.tax.form</field>
970             <field name="model">account.tax</field>
971             <field name="type">form</field>
972             <field name="arch" type="xml">
973                 <form string="Account Tax">
974                     <group colspan="4" col="6">
975                         <field name="name"/>
976                         <field name="description"/>
977                         <field name="type_tax_use"/>
978                         <field name="price_include"/>
979                         <field name="active"/>
980                         <field name="company_id" widget="selection" groups="base.group_multi_company"/>
981                     </group>
982                     <notebook colspan="4">
983                         <page string="Tax Definition" >
984                           <group colspan="4" col="4">
985                                   <field name="type"/>
986                                   <field name="amount" attrs="{'readonly':[('type','in',('none', 'code', 'balance'))]}"/>
987                                   <separator colspan="4" string="Accounting Information"/>
988                                   <field name="account_collected_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
989                                   <label colspan="2" nolabel="1" string="Keep empty to use the income account"/>
990                                   <field name="account_paid_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
991                                   <label colspan="2" nolabel="1" string="Keep empty to use the expense account"/>
992                                   <separator colspan="4" string="Tax Declaration: Invoices"/>
993                                   <field name="base_code_id"/>
994                                   <field name="base_sign"/>
995                                   <field name="tax_code_id"/>
996                                   <field name="tax_sign"/>
997                                   <separator colspan="4" string="Tax Declaration: Credit Notes"/>
998                                   <field name="ref_base_code_id"/>
999                                   <field name="ref_base_sign"/>
1000                                   <field name="ref_tax_code_id"/>
1001                                   <field name="ref_tax_sign"/>
1002                                   <separator groups="base.group_extended" colspan="4" string="Children Definition"/>
1003                                   <field groups="base.group_extended" name="child_depend"/>
1004                                   <field groups="base.group_extended" name="sequence"/>
1005                                   <field groups="base.group_extended" name="include_base_amount"/>
1006                                   <field groups="base.group_extended" colspan="4" name="child_ids">
1007                                       <tree string="Account Tax">
1008                                           <field name="sequence"/>
1009                                           <field name="name"/>
1010                                           <field name="price_include" groups="base.group_extended"/>
1011                                           <field name="description"/>
1012                                      </tree>
1013                                  </field>
1014                           </group>
1015                         </page>
1016                         <page groups="base.group_extended" string="Special Computation">
1017                             <separator colspan="4" string="Applicability Options"/>
1018                             <field name="applicable_type"/>
1019                             <field name="domain"/>
1020                             <separator colspan="4" string="Applicable Code (if type=code)"/>
1021                             <field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')], 'required':[('applicable_type','=','code')]}"/>
1022                             <separator colspan="2" string="Compute Code"/>
1023                             <separator colspan="2" string="Reverse Compute Code"/>
1024                             <field colspan="2" name="python_compute" nolabel="1" attrs="{'readonly':[('type','!=','code')],'required':[('type','=','code')]}"/>
1025                             <field colspan="2" name="python_compute_inv" nolabel="1" attrs="{'readonly':[('type','!=','code')],'required':[('type','=','code')]}"/>
1026
1027                         </page>
1028                     </notebook>
1029                 </form>
1030               </field>
1031         </record>
1032         <record id="action_tax_form" model="ir.actions.act_window">
1033             <field name="name">Taxes</field>
1034             <field name="res_model">account.tax</field>
1035             <field name="view_type">form</field>
1036             <field name="view_id" ref="view_tax_tree"/>
1037             <field name="domain">[('parent_id','=',False)]</field>
1038         </record>
1039         <menuitem action="action_tax_form" id="menu_action_tax_form" parent="next_id_27"/>
1040
1041         <record id="action_tax_code_tree" model="ir.actions.act_window">
1042             <field name="name">Chart of Taxes</field>
1043             <field name="res_model">account.tax.code</field>
1044             <field name="domain">[('parent_id','=',False)]</field>
1045             <field name="view_type">tree</field>
1046             <field name="view_id" ref="view_tax_code_tree"/>
1047             <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>
1048         </record>
1049
1050         <!--
1051     Entries lines
1052     -->
1053
1054         <record id="view_move_line_tree" model="ir.ui.view">
1055             <field name="name">account.move.line.tree</field>
1056             <field name="model">account.move.line</field>
1057             <field name="type">tree</field>
1058             <field eval="4" name="priority"/>
1059             <field name="arch" type="xml">
1060                 <tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items" editable="top" on_write="on_create_write">
1061                     <field name="date"/>
1062                     <field name="period_id"/>
1063                     <field name="move_id"/>
1064                     <field name="ref"/>
1065                     <field name="invoice"/>
1066                     <field name="name"/>
1067                     <field name="partner_id" on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"/>
1068                     <field name="account_id" domain="[('journal_id','=',journal_id), ('company_id', '=', company_id)]"/>
1069                     <field name="journal_id"/>
1070                     <field name="debit" sum="Total debit"/>
1071                     <field name="credit" sum="Total credit"/>
1072                     <field name="account_tax_id" groups="base.group_extended"/>
1073                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
1074                     <field name="amount_currency" groups="base.group_extended" attrs="{'readonly':[('state','=','valid')]}"/>
1075                     <field name="currency_id" groups="base.group_extended" attrs="{'readonly':[('state','=','valid')]}"/>
1076                     <field name="reconcile_partial_id" groups="base.group_extended"/>
1077                     <field name="reconcile_id"/>
1078                     <field name="state"/>
1079                 </tree>
1080             </field>
1081         </record>
1082
1083         <record id="view_move_line_form" model="ir.ui.view">
1084             <field name="name">account.move.line.form</field>
1085             <field name="model">account.move.line</field>
1086             <field name="type">form</field>
1087             <field eval="2" name="priority"/>
1088             <field name="arch" type="xml">
1089                 <form string="Journal Item">
1090                     <group col="6" colspan="4">
1091                         <field name="name" select="1"/>
1092                         <field name="ref"/>
1093                         <field name="partner_id" select="1" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
1094
1095                         <field name="journal_id"/>
1096                         <field name="period_id"/>
1097                         <field name="company_id" required="1" groups="base.group_multi_company"/>
1098                     </group>
1099                     <notebook colspan="4">
1100                         <page string="Information">
1101                             <group col="2" colspan="2">
1102                                 <separator colspan="2" string="Amount"/>
1103                                 <field name="account_id" select="1" domain="[('company_id', '=', company_id), ('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation')]"/>
1104                                 <field name="debit"/>
1105                                 <field name="credit"/>
1106                                 <field name="quantity"/>
1107                             </group>
1108
1109                             <group col="2" colspan="2">
1110                                 <separator colspan="2" string="Accounting Documents"/>
1111                                 <field name="invoice" readonly="True"/>
1112                                 <field name="move_id" required="False"/>
1113                                 <field name="statement_id" readonly="True"/>
1114                             </group>
1115
1116                             <group col="2" colspan="2">
1117                                 <separator colspan="2" string="Dates"/>
1118                                 <field name="date" select="1"/>
1119                                 <field name="date_maturity"/>
1120                                 <field name="date_created" readonly="True"/>
1121                             </group>
1122
1123                             <group col="2" colspan="2">
1124                                 <separator colspan="2" string="Taxes"/>
1125                                 <field name="tax_code_id"/>
1126                                 <field name="tax_amount"/>
1127                                 <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1128                             </group>
1129
1130                             <group col="2" colspan="2" attrs="{'readonly':[('state','=','valid')]}" >
1131                                 <separator colspan="2" string="Currency"/>
1132                                 <field name="currency_id"/>
1133                                 <field name="amount_currency"/>
1134                             </group>
1135
1136                             <group col="2" colspan="2">
1137                                 <separator colspan="2" string="Reconciliation"/>
1138                                 <field name="reconcile_id"/>
1139                                 <field name="reconcile_partial_id"/>
1140                             </group>
1141
1142                             <group col="2" colspan="2">
1143                                 <separator colspan="2" string="States"/>
1144                                 <field name="state"/>
1145                                 <field name="blocked"/>
1146                             </group>
1147
1148                             <group col="2" colspan="2"  groups="base.group_extended">
1149                                 <separator colspan="2" string="Analytic"/>
1150                                 <field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="analytic.group_analytic_accounting"/>
1151                             </group>
1152                             <separator string="Internal Note" colspan="4"/>
1153                             <field name="narration" colspan="4" nolabel="1"/>
1154                         </page>
1155                         <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1156                             <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)}"/>
1157                         </page>
1158                     </notebook>
1159                 </form>
1160             </field>
1161         </record>
1162
1163         <record id="view_move_line_form2" model="ir.ui.view">
1164             <field name="name">account.move.line.form2</field>
1165             <field name="model">account.move.line</field>
1166             <field name="type">form</field>
1167             <field eval="9" name="priority"/>
1168             <field name="arch" type="xml">
1169                 <form string="Journal Item">
1170                     <notebook colspan="4">
1171                         <page string="Information">
1172                             <separator colspan="4" string="General Information"/>
1173                             <field name="name" select="1"/>
1174                             <field name="date"/>
1175                             <field name="journal_id" readonly="False" select="1"/>
1176                             <field name="period_id" readonly="False"/>
1177                             <field name="account_id" select="1" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation'),('company_id', '=', company_id)]"/>
1178                             <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
1179                             <newline/>
1180                             <field name="debit"/>
1181                             <field name="credit"/>
1182
1183                             <separator colspan="4" string="Optional Information"/>
1184                             <field name="currency_id"/>
1185                             <field name="amount_currency"/>
1186                             <field name="quantity" select="3"/>
1187                             <field name="move_id" required="False"/>
1188                             <newline/>
1189                             <field name="date_maturity"/>
1190                             <field name="date_created"/>
1191                             <field name="date_created"/>
1192                             <field name="blocked" select="3"/>
1193                             <newline/>
1194                             <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1195                             <field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="analytic.group_analytic_accounting"/>
1196                             <separator colspan="4" string="State"/>
1197                             <newline/>
1198                             <field name="reconcile_id"/>
1199                             <field name="reconcile_partial_id"/>
1200                             <field name="state"/>
1201                         </page>
1202                         <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1203                             <field colspan="4" name="analytic_lines" nolabel="1" />
1204                         </page>
1205                     </notebook>
1206                 </form>
1207             </field>
1208         </record>
1209
1210         <record id="account_move_line_graph" model="ir.ui.view">
1211             <field name="name">account.move.line.graph</field>
1212             <field name="model">account.move.line</field>
1213             <field name="type">graph</field>
1214             <field name="arch" type="xml">
1215                 <graph string="Account Statistics" type="bar">
1216                     <field name="account_id"/>
1217                     <field name="debit" operator="+"/>
1218                     <field name="credit" operator="+"/>
1219                 </graph>
1220             </field>
1221         </record>
1222
1223         <record id="view_account_move_line_filter" model="ir.ui.view">
1224             <field name="name">Journal Items</field>
1225             <field name="model">account.move.line</field>
1226             <field name="type">search</field>
1227             <field name="arch" type="xml">
1228                 <search string="Search Journal Items">
1229                     <group>
1230                         <filter icon="terp-document-new" string="Unbalanced" domain="[('state','=','draft')]" help="Unbalanced Journal Items"/>
1231                         <separator orientation="vertical"/>
1232                         <filter icon="terp-document-new" string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Journal Items"/>
1233                         <filter name="posted" icon="terp-camera_test" string="Posted" domain="[('move_id.state','=','posted')]" help="Posted Journal Items"/>
1234                         <separator orientation="vertical"/>
1235                         <filter
1236                             icon="terp-dolar_ok!"
1237                             string="Unreconciled"
1238                             domain="[('reconcile_id','=',False), ('account_id.reconcile','=',True)]" help="Unreconciled Journal Items"
1239                             name="unreconciled"/>
1240                         <separator orientation="vertical"/>
1241                         <field name="move_id" string="Number (Move)"/>
1242                         <field name="date"/>
1243                         <field name="account_id"/>
1244                         <field name="partner_id">
1245                             <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)]"/>
1246                         </field>
1247                     </group>
1248                     <newline/>
1249                     <group>
1250                         <field name="journal_id" widget="selection" context="{'journal_id':self}"/>
1251                         <field name="period_id" context="{'period_id':self}"/>
1252                     </group>
1253                     <newline/>
1254                     <group expand="0" string="Group By...">
1255                         <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
1256                         <separator orientation="vertical"/>
1257                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1258                         <filter string="Account"  icon="terp-folder-green" context="{'group_by':'account_id'}"/>
1259                         <separator orientation="vertical"/>
1260                         <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
1261                     </group>
1262                     <newline/>
1263                 </search>
1264             </field>
1265         </record>
1266
1267         <record id="action_account_moves_all_a" model="ir.actions.act_window">
1268             <field name="name">Journal Items</field>
1269             <field name="res_model">account.move.line</field>
1270             <field name="view_type">form</field>
1271             <field name="view_mode">tree,form</field>
1272             <field name="context">{}</field>
1273             <field name="search_view_id" ref="view_account_move_line_filter"/>
1274             <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>
1275         </record>
1276
1277         <menuitem
1278             action="action_account_moves_all_a"
1279             icon="STOCK_JUSTIFY_FILL"
1280             id="menu_action_account_moves_all"
1281             parent="account.menu_finance_entries"
1282             sequence="1"
1283             groups="group_account_user"
1284         />
1285
1286         <record id="action_view_move_line" model="ir.actions.act_window">
1287             <field name="name">Lines to reconcile</field>
1288             <field name="res_model">account.move.line</field>
1289             <field name="view_type">form</field>
1290             <field name="view_mode">tree,form</field>
1291             <field name="domain">[('account_id.reconcile', '=', True),('reconcile_id','=',False)]</field>
1292             <field eval="False" name="view_id"/>
1293             <field eval="True" name="filter"/>
1294             <field name="search_view_id" ref="view_account_move_line_filter"/>
1295         </record>
1296
1297         <record id="action_move_line_select" model="ir.actions.act_window">
1298             <field name="name">Journal Items</field>
1299             <field name="res_model">account.move.line</field>
1300             <field name="view_type">form</field>
1301             <field name="view_mode">tree,form</field>
1302             <field name="view_id" ref="view_move_line_tree"/>
1303             <field name="search_view_id" ref="view_account_move_line_filter"/>
1304             <field name="context">{'search_default_account_id': [active_id]}</field>
1305         </record>
1306
1307         <record id="ir_account_move_line_select" model="ir.values">
1308             <field name="key2">tree_but_open</field>
1309             <field name="model">account.account</field>
1310             <field name="name">Open Journal Items</field>
1311             <field eval="'ir.actions.act_window,%d'%action_move_line_select" name="value"/>
1312         </record>
1313         <!--
1314     Account.Entry Edition
1315     -->
1316
1317         <record id="account_move_graph" model="ir.ui.view">
1318             <field name="name">account.move.graph</field>
1319             <field name="model">account.move</field>
1320             <field name="type">graph</field>
1321             <field name="arch" type="xml">
1322                 <graph string="Account Statistics" type="bar">
1323                     <field name="period_id"/>
1324                     <field name="amount" operator="+"/>
1325                 </graph>
1326             </field>
1327          </record>
1328         <record id="view_move_tree" model="ir.ui.view">
1329             <field name="name">account.move.tree</field>
1330             <field name="model">account.move</field>
1331             <field name="type">tree</field>
1332             <field name="arch" type="xml">
1333                 <tree colors="blue:state == 'draft';black:state == 'posted'" string="Journal Entries">
1334                     <field name="name"/>
1335                     <field name="ref"/>
1336                     <field name="date"/>
1337                     <field name="period_id"/>
1338                     <field name="journal_id"/>
1339                     <field name="partner_id"/>
1340                     <field name="amount" sum="Total Amount"/>
1341                     <field name="to_check" groups="base.group_extended"/>
1342                     <field name="state"/>
1343                     <button name="button_validate" states="draft" string="Approve" type="object" icon="terp-camera_test"/>
1344                 </tree>
1345             </field>
1346         </record>
1347         <record id="view_move_form" model="ir.ui.view">
1348             <field name="name">account.move.form</field>
1349             <field name="model">account.move</field>
1350             <field name="type">form</field>
1351             <field name="arch" type="xml">
1352                 <form string="Journal Entries">
1353                     <group colspan="4" col="6">
1354                         <field name="name" readonly="True"/>
1355                         <field name="ref"/>
1356                         <field name="to_check" groups="base.group_extended"/>
1357                         <field name="journal_id"/>
1358                         <field name="period_id"/>
1359                         <field name="date"/>
1360                         <field name="company_id" required="1" groups="base.group_multi_company"/>
1361                         <field name="partner_id" invisible="1"/>
1362                         <field name="amount" invisible="1"/>
1363                     </group>
1364                     <notebook colspan="4">
1365                         <page string="Journal Items">
1366                             <field name="balance" invisible="1"/>
1367                             <field colspan="4" name="line_id" nolabel="1" height="250" widget="one2many_list" 
1368                             on_change="onchange_line_id(line_id)"
1369                             context="{'balance': balance , 'journal': journal_id }">
1370                                 <form string="Journal Item">
1371                                     <group col="6" colspan="4">
1372                                         <field name="name"/>
1373                                         <field name="ref"/>
1374                                         <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
1375
1376                                         <field name="journal_id"/>
1377                                         <field name="period_id"/>
1378                                         <field name="company_id" required="1" groups="base.group_multi_company"/>
1379                                     </group>
1380                                     <notebook colspan="4">
1381                                         <page string="Information">
1382                                             <group col="2" colspan="2">
1383                                                 <separator colspan="2" string="Amount"/>
1384                                                 <field name="account_id" domain="[('company_id', '=', parent.company_id), ('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
1385                                                 <field name="debit"/>
1386                                                 <field name="credit"/>
1387                                                 <field name="quantity"/>
1388                                             </group>
1389
1390                                             <group col="2" colspan="2">
1391                                                 <separator colspan="2" string="Accounting Documents"/>
1392                                                 <field name="invoice"/>
1393                                                 <field name="move_id" required="False"/>
1394                                                 <field name="statement_id"/>
1395                                             </group>
1396
1397                                             <group col="2" colspan="2">
1398                                                 <separator colspan="2" string="Dates"/>
1399                                                 <field name="date"/>
1400                                                 <field name="date_maturity"/>
1401                                                 <field name="date_created"/>
1402                                             </group>
1403
1404                                             <group col="2" colspan="2">
1405                                                 <separator colspan="2" string="Taxes"/>
1406                                                 <field name="tax_code_id"/>
1407                                                 <field name="tax_amount"/>
1408                                                 <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1409                                             </group>
1410
1411                                             <group col="2" colspan="2">
1412                                                 <separator colspan="2" string="Currency"/>
1413                                                 <field name="currency_id"/>
1414                                                 <field name="amount_currency"/>
1415                                             </group>
1416
1417                                             <group col="2" colspan="2">
1418                                                 <separator colspan="2" string="Reconciliation"/>
1419                                                 <field name="reconcile_id"/>
1420                                                 <field name="reconcile_partial_id"/>
1421                                             </group>
1422
1423                                             <group col="2" colspan="2">
1424                                                 <separator colspan="2" string="States"/>
1425                                                 <field name="state"/>
1426                                                 <field name="blocked"/>
1427                                             </group>
1428
1429                                             <group col="2" colspan="2" groups="base.group_extended">
1430                                                 <separator colspan="2" string="Analytic"/>
1431                                                 <field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="analytic.group_analytic_accounting"/>
1432                                             </group>
1433                                             <separator string="Internal Note" colspan="4"/>
1434                                             <field name="narration" colspan="4" nolabel="1"/>
1435                                         </page>
1436                                         <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1437                                             <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)}"/>
1438                                         </page>
1439                                     </notebook>
1440                                 </form>
1441                                 <tree colors="blue:state == 'draft';black:state == 'posted'" editable="top" string="Journal Items">
1442                                     <field name="ref"/>
1443                                     <field name="invoice"/>
1444                                     <field name="name"/>
1445                                     <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
1446                                     <field name="account_id" domain="[('journal_id','=',parent.journal_id),('company_id', '=', parent.company_id)]"/>
1447                                     <field name="date_maturity"/>
1448                                     <field name="debit" sum="Total Debit"/>
1449                                     <field name="credit" sum="Total Credit"/>
1450                                     <field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="analytic.group_analytic_accounting"/>
1451                                     <field name="amount_currency" groups="base.group_extended"/>
1452                                     <field name="currency_id" groups="base.group_extended"/>
1453                                     <field name="tax_code_id"/>
1454                                     <field name="tax_amount"/>
1455                                     <field name="state"/>
1456                                     <field name="reconcile_id"/>
1457                                     <field name="reconcile_partial_id" groups="base.group_extended"/>
1458                                 </tree>
1459                             </field>
1460                             <separator colspan="4" string="Internal Note"/>
1461                             <field name="narration" colspan="4" nolabel="1" height="50"/>
1462                             <group col="4" colspan="4">
1463                                 <field name="state" select="1"/>
1464                                 <button name="button_cancel" states="posted" string="Cancel" type="object" icon="gtk-cancel"/>
1465                                 <button name="button_validate" states="draft" string="Post" type="object" icon="terp-camera_test"/>
1466                             </group>
1467                         </page>
1468                     </notebook>
1469                 </form>
1470             </field>
1471         </record>
1472
1473         <record id="view_account_move_filter" model="ir.ui.view">
1474             <field name="name">account.move.select</field>
1475             <field name="model">account.move</field>
1476             <field name="type">search</field>
1477             <field name="arch" type="xml">
1478                 <search string="Search Move">
1479                     <group>
1480                         <filter icon="terp-document-new" string="Unposted" domain="[('state','=','draft')]" help="Unposted Journal Entries"/>
1481                         <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Journal Entries"/>
1482                         <separator orientation="vertical"/>
1483                         <filter icon="terp-gtk-jump-to-ltr" string="To Review" domain="[('to_check','=',True)]" groups="base.group_extended" help="Journal Entries to Review"/>
1484                         <separator orientation="vertical"/>
1485                         <field name="name"/>
1486                         <field name="ref"/>
1487                         <field name="partner_id"/>
1488                         <field name="date"/>
1489                     </group>
1490                     <newline/>
1491                     <group>
1492                         <field name="journal_id" widget="selection"/>
1493                         <field name="period_id"/>
1494                     </group>
1495                     <newline/>
1496                     <group expand="0" string="Group By...">
1497                         <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
1498                         <separator orientation="vertical"/>
1499                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1500                         <filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
1501                         <separator orientation="vertical"/>
1502                         <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
1503                         <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
1504                     </group>
1505                 </search>
1506             </field>
1507         </record>
1508
1509         <record id="action_move_journal_line" model="ir.actions.act_window">
1510             <field name="name">Journal Entries</field>
1511             <field name="res_model">account.move</field>
1512             <field name="view_type">form</field>
1513             <field name="view_mode">tree,form,graph</field>
1514             <field name="view_id" ref="view_move_tree"/>
1515             <field name="search_view_id" ref="view_account_move_filter"/>
1516             <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>
1517         </record>
1518
1519         <menuitem
1520             icon="STOCK_JUSTIFY_FILL"
1521             action="action_move_journal_line"
1522             id="menu_action_move_journal_line_form"
1523             parent="account.menu_finance_entries"
1524             groups="group_account_user"
1525             sequence="5"/>
1526
1527         <record id="action_move_line_form" model="ir.actions.act_window">
1528             <field name="name">Entries</field>
1529             <field name="type">ir.actions.act_window</field>
1530             <field name="res_model">account.move</field>
1531             <field name="view_type">form</field>
1532             <field name="view_id" ref="view_move_tree"/>
1533             <field name="search_view_id" ref="view_account_move_filter"/>
1534         </record>
1535
1536         <act_window
1537             id="act_account_move_to_account_move_line_open"
1538             name="Journal Items"
1539             context="{'search_default_move_id':[active_id], 'default_move_id': active_id}"
1540             res_model="account.move.line"
1541             src_model="account.move"/>
1542
1543         <record id="action_move_line_search" model="ir.actions.act_window">
1544             <field name="name">Journal Items</field>
1545             <field name="type">ir.actions.act_window</field>
1546             <field name="res_model">account.move.line</field>
1547             <field name="view_type">form</field>
1548             <field name="view_mode">tree,form</field>
1549             <field name="view_id" ref="view_move_line_tree"/>
1550             <field name="search_view_id" ref="view_account_move_line_filter"/>
1551         </record>
1552         <record id="action_move_line_search_view1" model="ir.actions.act_window.view">
1553             <field eval="10" name="sequence"/>
1554             <field name="view_mode">tree</field>
1555             <field name="view_id" ref="view_move_line_tree"/>
1556             <field name="act_window_id" ref="action_move_line_search"/>
1557         </record>
1558         <record id="action_move_line_search_view2" model="ir.actions.act_window.view">
1559             <field eval="11" name="sequence"/>
1560             <field name="view_mode">form</field>
1561             <field name="act_window_id" ref="action_move_line_search"/>
1562         </record>
1563
1564         <act_window
1565             context="{'search_default_next_partner':1,'view_mode':True}"
1566             id="action_account_manual_reconcile" name="Journal Items"
1567             res_model="account.move.line"
1568             view_id="view_move_line_tree"/>
1569
1570
1571         <menuitem
1572              name="Manual Reconciliation" icon="STOCK_EXECUTE"
1573              action="action_account_manual_reconcile"
1574              id="menu_manual_reconcile"
1575              parent="account.periodical_processing_reconciliation"/>
1576
1577
1578         <act_window
1579             id="act_account_acount_move_line_open"
1580             name="Entries"
1581             context="{'search_default_account_id':[active_id], 'search_default_unreconciled':0, 'default_account_id': active_id}"
1582             res_model="account.move.line"
1583             src_model="account.account"/>
1584
1585         <act_window
1586             id="act_account_acount_move_line_open_unreconciled"
1587             name="Unreconciled Entries"
1588             res_model="account.move.line"
1589             context="{'search_default_account_id':[active_id], 'search_default_unreconciled':1, 'default_account_id': active_id}"
1590             src_model="account.account"/>
1591
1592         <act_window
1593             domain="[('reconcile_id', '=', active_id)]"
1594             id="act_account_acount_move_line_reconcile_open"
1595             name="Reconciled entries"
1596             res_model="account.move.line"
1597             src_model="account.move.reconcile"/>
1598
1599
1600         <!--
1601     TODO:
1602         Print Journal (and change state)
1603         Close Journal (and verify that there is no draft Entry Lines)
1604 -->
1605
1606         <record id="view_journal_period_tree" model="ir.ui.view">
1607             <field name="name">account.journal.period.tree</field>
1608             <field name="model">account.journal.period</field>
1609             <field name="type">tree</field>
1610             <field name="arch" type="xml">
1611                 <tree colors="blue:state == 'draft';gray:state == 'done';black:state == 'printed'" string="Journals">
1612                     <field icon="icon" name="fiscalyear_id"/>
1613                     <field name="period_id"/>
1614                     <field name="journal_id"/>
1615                     <field name="state"/>
1616                     <field name="company_id" groups="base.group_multi_company"/>
1617                 </tree>
1618             </field>
1619         </record>
1620         <record id="action_account_journal_period_tree" model="ir.actions.act_window">
1621             <field name="name">Journals</field>
1622             <field name="res_model">account.journal.period</field>
1623             <field name="view_type">tree</field>
1624             <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>
1625         </record>
1626
1627         <!--
1628         # Account Models
1629         -->
1630
1631         <record id="view_model_line_tree" model="ir.ui.view">
1632             <field name="name">account.model.line.tree</field>
1633             <field name="model">account.model.line</field>
1634             <field name="type">tree</field>
1635             <field name="arch" type="xml">
1636                 <tree string="Journal Entry Model Line" editable="bottom">
1637                     <field name="sequence"/>
1638                     <field name="name"/>
1639                     <field name="account_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation'), ('company_id', '=', parent.company_id)]"/>
1640                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1641                     <field name="partner_id"/>
1642                     <field name="debit"/>
1643                     <field name="credit"/>
1644                     <field name="date_maturity"/>
1645                 </tree>
1646             </field>
1647         </record>
1648
1649
1650         <record id="view_model_line_form" model="ir.ui.view">
1651             <field name="name">account.model.line.form</field>
1652             <field name="model">account.model.line</field>
1653             <field name="type">form</field>
1654             <field name="arch" type="xml">
1655                 <form string="Journal Entry Model Line">
1656                     <field colspan="4" name="name" select="1"/>
1657                     <field name="sequence"/>
1658                     <field name="account_id" domain="[('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation'), ('company_id', '=', parent.company_id)]"/>
1659                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1660                     <field name="partner_id"/>
1661                     <field name="debit" select="1"/>
1662                     <field name="credit" select="1"/>
1663                     <field name="quantity"/>
1664                     <field name="date_maturity"/>
1665                 </form>
1666             </field>
1667         </record>
1668
1669         <record id="view_model_form" model="ir.ui.view">
1670             <field name="name">account.model.form</field>
1671             <field name="model">account.model</field>
1672             <field name="type">form</field>
1673             <field name="arch" type="xml">
1674                 <form string="Journal Entry Model">
1675                     <field name="name"/>
1676                     <field name="journal_id"/>
1677                     <field name="company_id" widget='selection' groups="base.group_multi_company"/>
1678                     <field colspan="4" nolabel="1" name="lines_id" height="250" widget="one2many_list"/>
1679                     <separator string="Legend" colspan="4"/>
1680                     <field name="legend" colspan="4" nolabel="1"/>
1681                     <group col="1" colspan="4">
1682                         <button name="%(action_account_use_model_create_entry)d" string="Create entries" type="action" icon="gtk-execute"/>
1683                     </group>
1684                 </form>
1685             </field>
1686         </record>
1687
1688         <record id="view_model_tree" model="ir.ui.view">
1689             <field name="name">account.model.tree</field>
1690             <field name="model">account.model</field>
1691             <field name="type">tree</field>
1692             <field name="arch" type="xml">
1693                 <tree string="Journal Entry Model">
1694                     <field name="name"/>
1695                     <field name="journal_id"/>
1696                     <field name="company_id" groups="base.group_multi_company"/>
1697                 </tree>
1698             </field>
1699         </record>
1700
1701         <record id="view_model_search" model="ir.ui.view">
1702             <field name="name">account.model.search</field>
1703             <field name="model">account.model</field>
1704             <field name="type">search</field>
1705             <field name="arch" type="xml">
1706                 <search string="Journal Entry Model">
1707                   <group>
1708                     <filter string="Sale" icon="terp-camera_test" domain="[('journal_id.type', '=', 'sale')]"/>
1709                     <filter string="Purchase" icon="terp-purchase" domain="[('journal_id.type', '=', 'purchase')]"/>
1710                     <separator orientation="vertical"/>
1711                       <field name="name"/>
1712                       <field name="journal_id" widget="selection"/>
1713                       <field name="company_id" widget="selection" groups="base.group_multi_company"/>
1714                     </group>
1715                     <newline/>
1716                     <group expand="0" string="Group By...">
1717                       <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1718                     </group>
1719                 </search>
1720             </field>
1721         </record>
1722
1723         <record id="action_model_form" model="ir.actions.act_window">
1724             <field name="name">Recurring Models</field>
1725             <field name="res_model">account.model</field>
1726             <field name="view_type">form</field>
1727             <field name="view_mode">tree,form</field>
1728             <field name="search_view_id" ref="view_model_search"/>
1729         </record>
1730         <menuitem
1731             action="action_model_form" id="menu_action_model_form" sequence="5"
1732             parent="account.menu_configuration_misc" groups="base.group_extended"/>
1733
1734         <!--
1735             # Payment Terms
1736         -->
1737
1738         <record id="view_payment_term_line_tree" model="ir.ui.view">
1739             <field name="name">account.payment.term.line.tree</field>
1740             <field name="model">account.payment.term.line</field>
1741             <field name="type">tree</field>
1742             <field name="arch" type="xml">
1743                 <tree string="Payment Term">
1744                     <field name="sequence"/>
1745                     <field name="name"/>
1746                     <field name="value"/>
1747                     <field name="value_amount"/>
1748                     <field name="days"/>
1749                     <field name="days2"/>
1750                 </tree>
1751             </field>
1752         </record>
1753
1754
1755         <record id="view_payment_term_line_form" model="ir.ui.view">
1756             <field name="name">account.payment.term.line.form</field>
1757             <field name="model">account.payment.term.line</field>
1758             <field name="type">form</field>
1759             <field name="arch" type="xml">
1760                 <form string="Payment Term">
1761                     <group>
1762                         <group colspan="2" col="4">
1763                             <field name="name" select="1"/>
1764                             <separator string="Amount Computation" colspan="4"/>
1765                             <field name="value" colspan="4"/>
1766                             <field name="value_amount" colspan="4" attrs="{'readonly':[('value','=','balance')]}"/>
1767                         </group>
1768                         <group colspan="2" col="4">
1769                             <field name="sequence"/>
1770                             <separator string="Due Date Computation" colspan="4"/>
1771                             <field name="days" colspan="4"/>
1772                             <field name="days2" colspan="4"/>
1773                         </group>
1774                     </group>
1775                     <newline/>
1776                     <separator string="Example" colspan="4"/>
1777                     <label string="At 14 net days 2 percent, remaining amount at 30 days end of month." colspan="4"/>
1778                     <group colspan="2" col="2">
1779                         <label string="Line 1:" colspan="2"/>
1780                         <label string="  Valuation: Percent"/>
1781                         <label string="  Number of Days: 14"/>
1782                         <label string="  Value amount: 0.02"/>
1783                         <label string="  Day of the Month: 0"/>
1784                     </group>
1785                     <newline/>
1786                     <group colspan="2" col="2">
1787                         <label string="Line 2:" colspan="2"/>
1788                         <label string="  Valuation: Balance"/>
1789                         <label string="  Number of Days: 30"/>
1790                         <label string="  Value amount: n.a"/>
1791                         <label string="  Day of the Month= -1"/>
1792                     </group>
1793                 </form>
1794             </field>
1795         </record>
1796
1797         <record id="view_payment_term_search" model="ir.ui.view">
1798             <field name="name">account.payment.term.search</field>
1799             <field name="model">account.payment.term</field>
1800             <field name="type">search</field>
1801             <field name="arch" type="xml">
1802                 <search string="Payment Term">
1803                     <field name="name"/>
1804                     <field name="active"/>
1805                 </search>
1806             </field>
1807         </record>
1808
1809         <record id="view_payment_term_form" model="ir.ui.view">
1810             <field name="name">account.payment.term.form</field>
1811             <field name="model">account.payment.term</field>
1812             <field name="type">form</field>
1813             <field name="arch" type="xml">
1814                 <form string="Payment Term">
1815                     <separator colspan="4" string="Information"/>
1816                     <field name="name" select="1"/>
1817                     <field name="active" select="1"/>
1818                     <separator colspan="4" string="Description On Invoices"/>
1819                     <field colspan="4" name="note" nolabel="1"/>
1820                     <separator colspan="4" string="Computation"/>
1821                     <field colspan="4" name="line_ids" nolabel="1"/>
1822                 </form>
1823             </field>
1824         </record>
1825
1826         <record id="action_payment_term_form" model="ir.actions.act_window">
1827             <field name="name">Payment Terms</field>
1828             <field name="res_model">account.payment.term</field>
1829             <field name="view_type">form</field>
1830             <field name="view_mode">tree,form</field>
1831             <field name="search_view_id" ref="view_payment_term_search"/>
1832         </record>
1833         <menuitem action="action_payment_term_form"
1834             id="menu_action_payment_term_form" parent="menu_configuration_misc"/>
1835
1836         <!--
1837         # Account Subscriptions
1838         -->
1839
1840         <record id="view_subscription_line_form" model="ir.ui.view">
1841             <field name="name">account.subscription.line.form</field>
1842             <field name="model">account.subscription.line</field>
1843             <field name="type">form</field>
1844             <field name="arch" type="xml">
1845                 <form string="Subscription lines">
1846                     <field name="date"/>
1847                     <field name="move_id"/>
1848                 </form>
1849             </field>
1850         </record>
1851
1852         <record id="view_subscription_line_tree" model="ir.ui.view">
1853             <field name="name">account.subscription.line.tree</field>
1854             <field name="model">account.subscription.line</field>
1855             <field name="type">tree</field>
1856             <field name="arch" type="xml">
1857                 <tree string="Subscription lines">
1858                     <field name="date"/>
1859                     <field name="move_id"/>
1860                 </tree>
1861             </field>
1862         </record>
1863
1864         <record id="view_subscription_tree" model="ir.ui.view">
1865             <field name="name">account.subscription.tree</field>
1866             <field name="model">account.subscription</field>
1867             <field name="type">tree</field>
1868             <field name="arch" type="xml">
1869                 <tree colors="blue:state == 'draft';gray:state == 'done';black:state == 'running'" string="Entry Subscription">
1870                     <field name="name"/>
1871                     <field name="model_id"/>
1872                     <field name="ref"/>
1873                     <field name="date_start"/>
1874                     <field name="state"/>
1875                 </tree>
1876             </field>
1877         </record>
1878
1879          <record id="view_subscription_search" model="ir.ui.view">
1880             <field name="name">account.subscription.search</field>
1881             <field name="model">account.subscription</field>
1882             <field name="type">search</field>
1883             <field name="arch" type="xml">
1884                 <search string="Entry Subscription">
1885                     <group>
1886                         <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Subscription"/>
1887                         <filter icon="terp-camera_test" string="Running" domain="[('state','=','running')]" help="Running Subscription"/>
1888                         <separator orientation="vertical"/>
1889                         <field name="name"/>
1890                         <field name="model_id"/>
1891                         <field name="date_start"/>
1892                     </group>
1893                     <newline/>
1894                     <group expand="0" string="Group By...">
1895                         <filter string="Model" icon="terp-folder-orange" domain="[]" context="{'group_by':'model_id'}"/>
1896                         <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
1897                     </group>
1898                 </search>
1899             </field>
1900         </record>
1901
1902         <record id="view_subscription_form" model="ir.ui.view">
1903             <field name="name">account.subscription.form</field>
1904             <field name="model">account.subscription</field>
1905             <field name="type">form</field>
1906             <field name="arch" type="xml">
1907                 <form string="Recurring">
1908                     <group col="6" colspan="4">
1909                         <field name="name" select="1"/>
1910                         <field name="model_id"/>
1911                         <field name="ref" select="1"/>
1912                     </group>
1913                     <group col="2" colspan="2">
1914                         <separator colspan="4" string="Starts on"/>
1915                         <field name="date_start" select="1"/>
1916                         <field name="period_total"/>
1917                     </group>
1918
1919                     <group col="2" colspan="2">
1920                         <separator colspan="4" string="Valid Up to"/>
1921                         <field name="period_nbr"/>
1922                         <field name="period_type"/>
1923                     </group>
1924
1925                     <group col="2" colspan="2">
1926                     </group>
1927                     <separator colspan="4" string="Subscription Lines"/>
1928                     <field colspan="4" name="lines_id" widget="one2many_list" nolabel="1"/>
1929
1930                     <group col="6" colspan="4">
1931                         <field name="state"/>
1932                         <button name="state_draft" states="done" string="Set to Draft" type="object"  icon="gtk-convert" />
1933                         <button name="compute" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
1934                         <button name="remove_line" states="running" string="Remove Lines" type="object" icon="gtk-remove"/>
1935                     </group>
1936                 </form>
1937             </field>
1938         </record>
1939         <record id="action_subscription_form" model="ir.actions.act_window">
1940             <field name="name">Recurring Lines</field>
1941             <field name="res_model">account.subscription</field>
1942             <field name="view_type">form</field>
1943             <field name="view_mode">tree,form</field>
1944             <field name="search_view_id" ref="view_subscription_search"/>
1945             <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>
1946         </record>
1947         <menuitem
1948             name="Define Recurring Entries" action="action_subscription_form"
1949             groups="base.group_extended"
1950             id="menu_action_subscription_form" sequence="1"
1951             parent="account.menu_finance_recurrent_entries"/>
1952
1953         <record id="action_subscription_form_running" model="ir.actions.act_window">
1954             <field name="name">Running Subscriptions</field>
1955             <field name="res_model">account.subscription</field>
1956             <field name="view_type">form</field>
1957             <field name="view_mode">tree,form</field>
1958             <field name="domain">[('state','=','running')]</field>
1959             <field name="filter" eval="True"/>
1960         </record>
1961
1962         <record id="action_subscription_form_new" model="ir.actions.act_window">
1963             <field name="name">New Subscription</field>
1964             <field name="res_model">account.subscription</field>
1965             <field name="view_type">form</field>
1966             <field name="view_mode">form,tree</field>
1967             <field name="view_id" ref="view_subscription_form"/>
1968         </record>
1969
1970         <record id="view_subscription_line_form_complete" model="ir.ui.view">
1971             <field name="name">account.subscription.line.form</field>
1972             <field name="model">account.subscription.line</field>
1973             <field name="type">form</field>
1974             <field eval="20" name="priority"/>
1975             <field name="arch" type="xml">
1976                 <form string="Subscription lines">
1977                     <field name="subscription_id"/>
1978                     <field name="date"/>
1979                     <field name="move_id"/>
1980                 </form>
1981             </field>
1982         </record>
1983
1984         <record id="action_move_line_tree1" model="ir.actions.act_window">
1985             <field name="name">Journal Items</field>
1986             <field name="res_model">account.move.line</field>
1987             <field name="view_type">form</field>
1988             <field name="view_mode">tree,form</field>
1989             <field name="domain">[('account_id','child_of', [active_id]),('state','&lt;&gt;','draft')]</field>
1990             <field name="context">{'account_id':active_id}</field>
1991         </record>
1992
1993         <record id="view_move_line_tax_tree" model="ir.ui.view">
1994             <field name="name">account.move.line.tax.tree</field>
1995             <field name="model">account.move.line</field>
1996             <field name="type">tree</field>
1997             <field eval="4" name="priority"/>
1998             <field name="arch" type="xml">
1999                 <tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items">
2000                     <field name="date"/>
2001                     <field name="move_id"/>
2002                     <field name="statement_id" string="St."/>
2003                     <field name="name"/>
2004                     <field name="partner_id"/>
2005                     <field name="account_id"/>
2006                     <field name="tax_code_id"/>
2007                     <field name="tax_amount"/>
2008                     <field name="debit" sum="Total debit"/>
2009                     <field name="credit" sum="Total credit"/>
2010                     <field name="account_tax_id"/>
2011                     <field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="analytic.group_analytic_accounting"/>
2012                     <field name="state"/>
2013                 </tree>
2014             </field>
2015         </record>
2016
2017         <record id="action_tax_code_line_open" model="ir.actions.act_window">
2018             <field name="name">Journal Items</field>
2019             <field name="res_model">account.move.line</field>
2020             <field name="view_type">form</field>
2021             <field name="view_mode">tree,form</field>
2022             <field name="view_id" ref="view_move_line_tax_tree"/>
2023             <field name="domain">[('tax_code_id','child_of',active_id),('state','&lt;&gt;','draft')]</field>
2024         </record>
2025         <record id="ir_open_tax_move_line" model="ir.values">
2026             <field name="key2">tree_but_open</field>
2027             <field name="model">account.tax.code</field>
2028             <field name="name">Tax Details</field>
2029             <field eval="'ir.actions.act_window,%d'%action_tax_code_line_open" name="value"/>
2030         </record>
2031
2032
2033         <!--
2034     # Admin config
2035     -->
2036
2037         <act_window
2038            id="act_account_journal_2_account_bank_statement"
2039            name="Bank statements"
2040            context="{'search_default_journal_id': active_id, 'default_journal_id': active_id}"
2041            res_model="account.bank.statement"
2042            src_model="account.journal"/>
2043
2044         <act_window
2045            id="act_account_journal_2_account_move_line"
2046            name="Journal Items"
2047            context="{'search_default_journal_id':active_id, 'default_journal_id': active_id}"
2048            res_model="account.move.line"
2049            src_model="account.journal"/>
2050
2051         <act_window
2052             context="{'search_default_reconcile_id':False, 'search_default_partner_id':[active_id], 'default_partner_id': active_id}"
2053             domain="[('account_id.reconcile', '=', True),('account_id.type', 'in', ['receivable', 'payable'])]"
2054             id="act_account_partner_account_move_all"
2055             name="Receivables &amp; Payables"
2056             res_model="account.move.line"
2057             src_model="res.partner"
2058             groups="base.group_extended"/>
2059
2060         <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"/>
2061
2062         <record id="view_account_addtmpl_wizard_form" model="ir.ui.view">
2063             <field name="name">Create Account</field>
2064             <field name="model">account.addtmpl.wizard</field>
2065             <field name="type">form</field>
2066             <field name="arch" type="xml">
2067                 <form string="Create Account">
2068                     <separator col="4" colspan="4" string="Create an Account based on this template"/>
2069                     <field name="cparent_id"/>
2070                     <newline/>
2071                     <group col="2" colspan="2">
2072                         <button icon="gtk-cancel" special="cancel" string="Cancel" name="action_cancel" type="object"/>
2073                         <button icon="gtk-ok" name="action_create" string="Add" type="object"/>
2074                     </group>
2075                 </form>
2076             </field>
2077         </record>
2078
2079         <act_window domain="[]" id="action_account_addtmpl_wizard_form"
2080             name="Create Account"
2081             target="new"
2082             res_model="account.addtmpl.wizard"
2083             context="{'tmpl_ids': active_id}"
2084             src_model="account.account.template"
2085             view_type="form" view_mode="form"/>
2086
2087         <!-- Account Templates -->
2088         <menuitem
2089             id="account_template_folder"
2090             name="Templates"
2091             parent="menu_finance_accounting"
2092             groups="base.group_multi_company"/>
2093         <menuitem
2094             id="account_template_taxes"
2095             name="Taxes"
2096             parent="account_template_folder"
2097             sequence="2"/>
2098         <menuitem
2099             id="account_template_accounts"
2100             name="Accounts"
2101             parent="account_template_folder"
2102             sequence="1"/>
2103
2104
2105         <record id="view_account_template_form" model="ir.ui.view">
2106             <field name="name">account.account.template.form</field>
2107             <field name="model">account.account.template</field>
2108             <field name="type">form</field>
2109             <field name="arch" type="xml">
2110                 <form string="Account Template">
2111                     <notebook>
2112                         <page string="General Information">
2113                             <field name="name"/>
2114                             <field name="code"/>
2115                             <newline/>
2116                             <field name="parent_id"/>
2117                             <field name="shortcut"/>
2118                             <field name="type"/>
2119                             <field name="user_type"/>
2120
2121                             <field name="currency_id"/>
2122                             <field name="reconcile"/>
2123                             <field name="chart_template_id"/>
2124                             <separator string="Default taxes" colspan="4"/>
2125                             <field name="tax_ids" colspan="4" nolabel="1"/>
2126                         </page>
2127                         <page string="Notes">
2128                             <field colspan="4" name="note" nolabel="1"/>
2129                         </page>
2130                     </notebook>
2131                 </form>
2132             </field>
2133         </record>
2134
2135         <record id="view_account_template_tree" model="ir.ui.view">
2136             <field name="name">account.account.template.tree</field>
2137             <field name="model">account.account.template</field>
2138             <field name="type">tree</field>
2139             <field name="arch" type="xml">
2140                 <tree string="Account Template">
2141                     <field name="code"/>
2142                     <field name="name"/>
2143                     <field name="type" invisible="1"/>
2144                     <field name="user_type" invisible="1"/>
2145                 </tree>
2146             </field>
2147         </record>
2148
2149         <record id="view_account_template_search" model="ir.ui.view">
2150             <field name="name">account.account.template.search</field>
2151             <field name="model">account.account.template</field>
2152             <field name="type">search</field>
2153             <field name="arch" type="xml">
2154                 <search string="Search Account Templates">
2155                     <group>
2156                         <filter icon="terp-sale" string="Receivale Accounts" domain="[('type','=','receivable')]"/>
2157                          <filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
2158                          <separator orientation="vertical"/>
2159                         <field name="code"/>
2160                         <field name="name"/>
2161                         <field name="parent_id"/>
2162                         <field name="type"/>
2163                         <field name="user_type"/>
2164                     </group>
2165                     <newline/>
2166                     <group expand="0" string="Group By...">
2167                         <filter string="Internal Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
2168                         <filter string="Account Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'user_type'}"/>
2169                    </group>
2170                 </search>
2171             </field>
2172         </record>
2173
2174         <record id="action_account_template_form" model="ir.actions.act_window">
2175             <field name="name">Account Templates</field>
2176             <field name="res_model">account.account.template</field>
2177             <field name="view_type">form</field>
2178             <field name="view_mode">tree,form</field>
2179             <field name="search_view_id" ref="view_account_template_search"/>
2180         </record>
2181
2182         <menuitem action="action_account_template_form" id="menu_action_account_template_form" parent="account_template_accounts"/>
2183
2184         <!-- Chart of Accounts Templates -->
2185
2186         <record id="view_account_chart_template_form" model="ir.ui.view">
2187             <field name="name">account.chart.template.form</field>
2188             <field name="model">account.chart.template</field>
2189             <field name="type">form</field>
2190             <field name="arch" type="xml">
2191                 <form string="Chart of Accounts Template">
2192                     <group>
2193                     <field name="name"/>
2194                     <field name="account_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
2195                     <field name="bank_account_view_id" attrs="{'required': [('parent_id', '=', False)]}"/>
2196                     <field name="tax_code_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
2197                     <field name="parent_id" />
2198                     <!--<field name="code_digits" />-->
2199                     <field name="visible" />
2200                     <field name="complete_tax_set" />
2201                     </group>
2202                     <field name="tax_template_ids" colspan="4" readonly="1" nolabel="1"/>
2203                     <separator string="Properties" colspan="4"/>
2204                     <group>
2205                     <field name="property_account_receivable" domain="[('id', 'child_of', [account_root_id])]"/>
2206                     <field name="property_account_payable" domain="[('id', 'child_of', [account_root_id])]"/>
2207                     <field name="property_account_expense_categ" domain="[('id', 'child_of', [account_root_id])]"/>
2208                     <field name="property_account_income_categ" domain="[('id', 'child_of', [account_root_id])]" />
2209                     <field name="property_account_expense" domain="[('id', 'child_of', [account_root_id])]"/>
2210                     <field name="property_account_income" domain="[('id', 'child_of', [account_root_id])]"/>
2211                     <field name="property_account_income_opening" domain="[('id', 'child_of', [account_root_id])]"/>
2212                     <field name="property_account_expense_opening" domain="[('id', 'child_of', [account_root_id])]"/>
2213                     <field name="property_reserve_and_surplus_account" />
2214                     </group>
2215                 </form>
2216             </field>
2217         </record>
2218         <record id="view_account_chart_template_seacrh" model="ir.ui.view">
2219             <field name="name">account.chart.template.search</field>
2220             <field name="model">account.chart.template</field>
2221             <field name="type">search</field>
2222             <field name="arch" type="xml">
2223                 <search string="Search Chart of Account Templates">
2224                       <group>
2225                           <field name="name"/>
2226                         <field name="account_root_id"/>
2227                         <field name="bank_account_view_id"/>
2228                       </group>
2229                       <newline/>
2230                       <group expand="0" string="Group By...">
2231                         <filter string="Root Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'account_root_id'}"/>
2232                         <filter string="Bank Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'bank_account_view_id'}"/>
2233                         <separator orientation="vertical"/>
2234                         <filter string="Receivable Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_receivable'}"/>
2235                         <filter string="Payable Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_payable'}"/>
2236                         <separator orientation="vertical"/>
2237                         <filter string="Income Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_income_categ'}"/>
2238                         <filter string="Expense Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_expense_categ'}"/>
2239                       </group>
2240                 </search>
2241             </field>
2242         </record>
2243         <record id="view_account_chart_template_tree" model="ir.ui.view">
2244             <field name="name">account.chart.template.tree</field>
2245             <field name="model">account.chart.template</field>
2246             <field name="type">tree</field>
2247             <field name="arch" type="xml">
2248                 <tree string="Chart of Accounts Template">
2249                     <field name="name"/>
2250                     <field name="account_root_id"/>
2251                     <field name="tax_code_root_id"/>
2252                     <field name="bank_account_view_id"/>
2253                     <field name="property_account_receivable" invisible="1"/>
2254                     <field name="property_account_payable" invisible="1"/>
2255                     <field name="property_account_expense_categ" invisible="1"/>
2256                     <field name="property_account_income_categ" invisible="1"/>
2257                 </tree>
2258             </field>
2259         </record>
2260         <record id="action_account_chart_template_form" model="ir.actions.act_window">
2261             <field name="name">Chart of Accounts Templates</field>
2262             <field name="res_model">account.chart.template</field>
2263             <field name="view_type">form</field>
2264             <field name="view_mode">tree,form</field>
2265         </record>
2266
2267         <menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_accounts" sequence="1"/>
2268
2269         <!-- Account Tax Templates -->
2270
2271         <record id="view_account_tax_template_form" model="ir.ui.view">
2272             <field name="name">account.tax.template.form</field>
2273             <field name="model">account.tax.template</field>
2274             <field name="type">form</field>
2275             <field name="arch" type="xml">
2276                 <form string="Account Tax Template">
2277                     <group colspan="4">
2278                         <field name="name"/>
2279                         <field name="description"/>
2280                         <newline/>
2281                         <field name="chart_template_id"/>
2282                         <field name="type"/>
2283                         <field name="type_tax_use"/>
2284                         <group colspan="2" col="4">
2285                             <field name="price_include"/>
2286                         </group>
2287                     </group>
2288                     <notebook colspan="4">
2289                         <page string="Tax Definition">
2290                             <field name="applicable_type"/>
2291                             <field name="amount" attrs="{'readonly':[('type','=','none'),('type','=','code')]}"/>
2292                             <field groups="base.group_extended" name="include_base_amount"/>
2293                             <field groups="base.group_extended" name="domain"/>
2294                             <newline/>
2295                             <field name="account_collected_id"/>
2296                             <label colspan="2" nolabel="1" string="Keep empty to use the income account"/>
2297                             <field name="account_paid_id"/>
2298                             <label colspan="2" nolabel="1" string="Keep empty to use the expense account"/>
2299                             <field groups="base.group_extended" name="child_depend"/>
2300                             <field groups="base.group_extended" name="sequence"/>
2301                         </page>
2302                         <page string="Tax Declaration">
2303                             <separator colspan="4" string="Invoices"/>
2304                             <field name="base_code_id"/>
2305                             <field name="base_sign"/>
2306                             <field name="tax_code_id"/>
2307                             <field name="tax_sign"/>
2308
2309                             <separator colspan="4" string="Credit Notes"/>
2310                             <field name="ref_base_code_id"/>
2311                             <field name="ref_base_sign"/>
2312                             <field name="ref_tax_code_id"/>
2313                             <field name="ref_tax_sign"/>
2314                         </page>
2315                         <page groups="base.group_extended" string="Special Computation">
2316                             <separator colspan="4" string="Compute Code (if type=code)"/>
2317                             <field colspan="4" name="python_compute" nolabel="1" attrs="{'readonly':[('type','!=','code')]}"/>
2318                             <separator colspan="4" string="Compute Code for Taxes included prices"/>
2319                             <field colspan="4" name="python_compute_inv" nolabel="1"/>
2320                             <separator colspan="4" string="Applicable Code (if type=code)"/>
2321                             <field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')]}"/>
2322                         </page>
2323                     </notebook>
2324                 </form>
2325             </field>
2326         </record>
2327         <record id="view_account_tax_template_tree" model="ir.ui.view">
2328             <field name="name">account.tax.template.tree</field>
2329             <field name="model">account.tax.template</field>
2330             <field name="type">tree</field>
2331             <field name="arch" type="xml">
2332                 <tree string="Account Tax Template">
2333                     <field name="name" />
2334                     <field name="description"/>
2335                 </tree>
2336             </field>
2337         </record>
2338         <record id="view_account_tax_template_search" model="ir.ui.view">
2339             <field name="name">account.tax.template.search</field>
2340             <field name="model">account.tax.template</field>
2341             <field name="type">search</field>
2342             <field name="arch" type="xml">
2343                 <search string="Search Tax Templates">
2344                     <group>
2345                         <filter icon="terp-sale" string="Sale" domain="[('type_tax_use','=','sale')]" help="Taxes used in Sales"/>
2346                         <filter icon="terp-purchase" string="Purchase" domain="[('type_tax_use','=','purchase')]" help="Taxes used in Purchases"/>
2347                         <separator orientation="vertical"/>
2348                         <field name="name"/>
2349                         <field name="description"/>
2350                         <field name="chart_template_id"/>
2351                     </group>
2352                 </search>
2353             </field>
2354         </record>
2355
2356         <record id="action_account_tax_template_form" model="ir.actions.act_window">
2357             <field name="name">Tax Templates</field>
2358             <field name="res_model">account.tax.template</field>
2359             <field name="view_type">form</field>
2360             <field name="view_mode">tree,form</field>
2361             <field name="search_view_id" ref="view_account_tax_template_search"/>
2362         </record>
2363
2364         <menuitem action="action_account_tax_template_form" id="menu_action_account_tax_template_form" parent="account_template_taxes" sequence="13"/>
2365
2366         <!-- Account Tax Code Templates -->
2367         <record id="view_tax_code_template_tree" model="ir.ui.view">
2368             <field name="name">account.tax.code.template.tree</field>
2369             <field name="model">account.tax.code.template</field>
2370             <field name="type">tree</field>
2371             <field name="field_parent">child_ids</field>
2372             <field name="arch" type="xml">
2373                 <tree string="Account Tax Code Template" toolbar="1">
2374                     <field name="name"/>
2375                     <field name="code"/>
2376                     <field name="parent_id" invisible="1"/>
2377                 </tree>
2378             </field>
2379         </record>
2380
2381         <record id="view_tax_code_template_search" model="ir.ui.view">
2382             <field name="name">account.tax.code.template.search</field>
2383             <field name="model">account.tax.code.template</field>
2384             <field name="type">search</field>
2385             <field name="arch" type="xml">
2386                 <search string="Search tax template">
2387                     <group>
2388                         <field name="name"/>
2389                         <field name="code"/>
2390                         <field name="parent_id"/>
2391                     </group>
2392                     <newline/>
2393                     <group expand="0" string="Group By...">
2394                         <filter string="Parent Code" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
2395                     </group>
2396                 </search>
2397             </field>
2398         </record>
2399
2400         <record id="view_tax_code_template_form" model="ir.ui.view">
2401             <field name="name">account.tax.code.template.form</field>
2402             <field name="model">account.tax.code.template</field>
2403             <field name="type">form</field>
2404             <field name="arch" type="xml">
2405                 <form string="Account Tax Code Template">
2406                     <field name="name" select="1"/>
2407                     <field name="code" select="1"/>
2408                     <field name="parent_id" select="1"/>
2409                     <field name="sign"/>
2410                     <newline/>
2411                     <separator string="Description" colspan="4"/>
2412                     <field colspan="4" name="info" nolabel="1"/>
2413                 </form>
2414             </field>
2415         </record>
2416
2417         <record id="action_account_tax_code_template_form" model="ir.actions.act_window">
2418             <field name="name">Tax Code Templates</field>
2419             <field name="res_model">account.tax.code.template</field>
2420             <field name="view_type">form</field>
2421             <field name="view_mode">tree,form</field>
2422             <field name="search_view_id" ref="view_tax_code_template_search"/>
2423         </record>
2424         <menuitem action="action_account_tax_code_template_form" id="menu_action_account_tax_code_template_form" parent="account_template_taxes" sequence="14"/>
2425
2426
2427         <!--  Wizard for Multi Charts of Accounts -->
2428
2429         <record id="view_wizard_multi_chart" model="ir.ui.view">
2430             <field name="name">Generate Chart of Accounts from a Chart Template</field>
2431             <field name="model">wizard.multi.charts.accounts</field>
2432             <field name="type">form</field>
2433             <field name="inherit_id" ref="base.res_config_view_base"/>
2434             <field name="arch" type="xml">
2435               <data>
2436                 <form position="attributes">
2437                   <attribute name="string">Accounting Application Configuration</attribute>
2438                 </form>
2439                 <separator string="title" position="attributes">
2440                 <attribute name="string">Generate Your Chart of Accounts from a Chart Template</attribute>
2441                   </separator>
2442                   <xpath expr="//label[@string='description']" position="attributes">
2443                     <attribute name="string">This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template</attribute>
2444                     <attribute name="width">150</attribute>
2445                   </xpath>
2446                   <xpath expr='//separator[@string="vsep"]' position='attributes'>
2447                           <attribute name='rowspan'>15</attribute>
2448                           <attribute name='string'></attribute>
2449                   </xpath>
2450                 <group string="res_config_contents" position="replace">
2451                     <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 -->
2452                     <field name ="code_digits" groups="account.group_account_user"/>
2453                     <field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
2454                     <field name ="seq_journal" groups="base.group_extended"/>
2455                     <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'))]"/>
2456                     <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'))]"/>
2457                     <newline/>
2458                     <field name ="sale_tax_rate" attrs="{'invisible': [('complete_tax_set', '=', True)]}" on_change="onchange_tax_rate(sale_tax_rate)"/>
2459                     <field name ="purchase_tax_rate" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>
2460                     <field name ="complete_tax_set" invisible="1"/>
2461                     <newline/> <!-- extended view because the web UI is not good for one2many -->
2462                     <field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list" groups="account.group_account_user">
2463                         <form string="Bank Information">
2464                             <field name="acc_name"/>
2465                             <field name="account_type"/>
2466                             <field name="currency_id" widget="selection" groups="base.group_extended"/>
2467                         </form>
2468                         <tree editable="bottom" string="Bank Information">
2469                             <field name="acc_name"/>
2470                             <field name="account_type"/>
2471                             <field name="currency_id" widget="selection" groups="base.group_extended"/>
2472                         </tree>
2473                     </field>
2474                 </group>
2475               </data>
2476             </field>
2477         </record>
2478
2479         <record id="action_wizard_multi_chart" model="ir.actions.act_window">
2480             <field name="name">Generate Chart of Accounts from a Chart Template</field>
2481             <field name="type">ir.actions.act_window</field>
2482             <field name="res_model">wizard.multi.charts.accounts</field>
2483             <field name="view_id" ref="view_wizard_multi_chart"/>
2484             <field name="view_type">form</field>
2485             <field name="view_mode">form</field>
2486             <field name="target">new</field>
2487         </record>
2488         <record id="ir_actions_server_action_wizard_multi_chart" model="ir.actions.server">
2489             <field name="type">ir.actions.server</field>
2490             <field name="condition">True</field>
2491             <field name="state">code</field>
2492             <field name="model_id" ref="base.model_ir_actions_todo"/>
2493             <field eval="5" name="sequence"/>
2494             <field name="code">
2495 # check for unconfigured companies
2496 account_installer_obj = self.pool.get('account.installer')
2497 account_installer_obj.check_unconfigured_cmp(cr, uid, context=context)
2498 action_ids = []
2499 # fetch the act_window actions related to chart of account configuration
2500 # we use ir.actions.todo to enable the possibility for other modules to insert their own
2501 # wizards during the configuration process
2502 ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'action_wizard_multi_chart')
2503 if ref:
2504     action_ids += [ref[1]]
2505 ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'action_account_configuration_installer')
2506 if ref:
2507     action_ids += [ref[1]]
2508 todo_ids = pool.get('ir.actions.todo').search(cr, uid, [('action_id', 'in', action_ids)], context=context)
2509 pool.get('ir.actions.todo').write(cr, uid, todo_ids, {'state':'open'}, context=context)
2510 action = pool.get('res.config').next(cr, uid, [], context)
2511 </field>
2512            <field name="name">New Company Financial Setting</field>
2513         </record>
2514
2515         <record id="account_account_graph" model="ir.ui.view">
2516             <field name="name">account.account.graph</field>
2517             <field name="model">account.account</field>
2518             <field name="type">graph</field>
2519             <field name="arch" type="xml">
2520                 <graph string="Account Statistics" type="bar">
2521                     <field name="name"/>
2522                     <field name="balance" operator="+"/>
2523                 </graph>
2524             </field>
2525          </record>
2526
2527          <!-- Fiscal Position Templates -->
2528
2529         <record id="view_account_position_template_search" model="ir.ui.view">
2530             <field name="name">account.fiscal.position.template.search</field>
2531             <field name="model">account.fiscal.position.template</field>
2532             <field name="type">search</field>
2533             <field name="arch" type="xml">
2534                 <search string="Fiscal Position">
2535                     <field name="name"/>
2536                 </search>
2537             </field>
2538         </record>
2539
2540         <record id="view_account_position_template_form" model="ir.ui.view">
2541             <field name="name">account.fiscal.position.template.form</field>
2542             <field name="model">account.fiscal.position.template</field>
2543             <field name="type">form</field>
2544             <field name="arch" type="xml">
2545                 <form string="Fiscal Position Template">
2546                     <field name="name"/>
2547                     <field name="chart_template_id"/>
2548                     <newline/>
2549                     <field name="tax_ids" colspan="4" nolabel="1">
2550                         <tree string="Taxes Mapping" editable="bottom">
2551                             <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
2552                             <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
2553                         </tree>
2554                         <form string="Taxes Mapping">
2555                             <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
2556                             <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
2557                         </form>
2558                     </field>
2559                     <field name="account_ids" colspan="4" nolabel="1">
2560                         <tree string="Accounts Mapping" editable="bottom">
2561                             <field name="account_src_id"/>
2562                             <field name="account_dest_id"/>
2563                         </tree>
2564                         <form string="Accounts Mapping">
2565                             <field name="account_src_id"/>
2566                             <field name="account_dest_id"/>
2567                         </form>
2568                     </field>
2569                 </form>
2570             </field>
2571         </record>
2572         <record id="view_account_position_template_tree" model="ir.ui.view">
2573             <field name="name">account.fiscal.position.template.tree</field>
2574             <field name="model">account.fiscal.position.template</field>
2575             <field name="type">tree</field>
2576             <field name="arch" type="xml">
2577                 <tree string="Fiscal Position">
2578                     <field name="name"/>
2579                 </tree>
2580             </field>
2581         </record>
2582
2583         <record id="action_account_fiscal_position_template_form" model="ir.actions.act_window">
2584             <field name="name">Fiscal Position Templates</field>
2585             <field name="res_model">account.fiscal.position.template</field>
2586             <field name="view_type">form</field>
2587             <field name="view_mode">tree,form</field>
2588             <field name="search_view_id" ref="view_account_position_template_search"/>
2589         </record>
2590
2591         <menuitem
2592             action="action_account_fiscal_position_template_form"
2593             id="menu_action_account_fiscal_position_form_template"
2594             parent="account_template_taxes" sequence="20"/>
2595
2596         <!-- Cash Statement -->
2597         <record id="view_cash_statement_tree" model="ir.ui.view">
2598             <field name="name">account.bank.statement.tree</field>
2599             <field name="model">account.bank.statement</field>
2600             <field name="type">tree</field>
2601             <field name="arch" type="xml">
2602                 <tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end);black:state == 'open'" string="Statement">
2603                     <field name="name"/>
2604                     <field name="date"/>
2605                     <field name="period_id"/>
2606                     <field name="journal_id"/>
2607                     <field name="balance_start"/>
2608                     <field name="balance_end_real"/>
2609                     <field name="balance_end"/>
2610                     <field name="state"/>
2611                     <button type="object" string="Cancel" name="button_cancel" states="confirm" icon="gtk-cancel"/>
2612                     <button type="object" string="Open" name="button_open" states="draft" icon="terp-camera_test"/>
2613                     <button type="object" string="Confirm" name="button_confirm_bank" states="open" icon="terp-gtk-go-back-rtl"/>
2614                 </tree>
2615             </field>
2616         </record>
2617
2618         <record id="view_bank_statement_form2" model="ir.ui.view">
2619             <field name="name">account.bank.statement.form</field>
2620             <field name="model">account.bank.statement</field>
2621             <field name="type">form</field>
2622             <field name="arch" type="xml">
2623                 <form string="Statement">
2624                     <group col="6" colspan="4">
2625                         <field name="name" select="1"/>
2626                         <field name='company_id' widget="selection" groups="base.group_multi_company" />
2627                         <field name="journal_id" on_change="onchange_journal_id(journal_id)" select="1" widget="selection" domain="[('type', '=', 'cash')]"/>
2628                         <field name="user_id" select="1" readonly="1"/>
2629                         <field name="period_id" select="1"/>
2630                         <field name="currency" invisible="1"/>
2631                     </group>
2632
2633                     <notebook colspan="4">
2634                         <page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
2635                             <field colspan="4" name="line_ids" nolabel="1" context="{'date':date}">
2636                                 <tree editable="bottom" string="Statement lines">
2637                                     <field name="sequence" invisible="1"/>
2638                                     <field name="date" groups="base.group_extended"/>
2639                                     <field name="name"/>
2640                                     <field name="ref"/>
2641                                     <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
2642                                     <field name="type" on_change="onchange_type(partner_id, type)"/>
2643                                     <field domain="[('journal_id','=',parent.journal_id), ('company_id', '=', parent.company_id)]" name="account_id"/>
2644                                     <field name="analytic_account_id" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]" groups="analytic.group_analytic_accounting" />
2645                                     <field name="amount"/>
2646                                 </tree>
2647                                 <form string="Statement lines">
2648                                     <field name="date"/>
2649                                     <field name="name"/>
2650                                     <field name="ref"/>
2651                                     <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
2652                                     <field name="type" on_change="onchange_type(partner_id, type)"/>
2653                                     <field domain="[('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view'), ('company_id', '=', parent.company_id)]" name="account_id"/>
2654                                     <field name="analytic_account_id" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]" groups="analytic.group_analytic_accounting" />
2655                                     <field name="amount"/>
2656                                     <field name="sequence"/>
2657                                     <separator colspan="4" string="Notes"/>
2658                                     <field colspan="4" name="note" nolabel="1"/>
2659                                 </form>
2660                             </field>
2661                         </page>
2662                         <page string="CashBox">
2663                             <group col="2" colspan="2" expand="1">
2664                                 <field name="starting_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','!=','draft')]}">
2665                                     <tree string = "Opening Balance" editable="bottom">
2666                                         <field name="pieces"/>
2667                                         <field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
2668                                         <field name="subtotal" sum="Total"/>
2669                                     </tree>
2670                                     <form string = "Opening Balance">
2671                                         <field name="pieces"/>
2672                                         <field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
2673                                         <field name="subtotal"/>
2674                                     </form>
2675                                 </field>
2676                             </group>
2677                             <group col="2" colspan="2" expand="1">
2678                                 <field name="ending_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','!=','open')]}">
2679                                     <tree string = "Closing Balance" editable="bottom">
2680                                         <field name="pieces"/>
2681                                         <field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
2682                                         <field name="subtotal" sum="Total"/>
2683                                     </tree>
2684                                     <form string = "Closing Balance">
2685                                         <field name="pieces"/>
2686                                         <field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
2687                                         <field name="subtotal"/>
2688                                     </form>
2689                                 </field>
2690                             </group>
2691                         </page>
2692                         <page string="Journal Entries" attrs="{'invisible': [('state','!=','confirm')]}">
2693                             <field colspan="4" name="move_line_ids" nolabel="1" string="Journal Entries"/>
2694                         </page>
2695                     </notebook>
2696                     <group col="6" colspan="4">
2697                         <group col="2" colspan="2">
2698                             <separator string="Dates" colspan="4"/>
2699                             <field name="date" select="1" attrs="{'readonly':[('state','!=','draft')]}"  on_change="onchange_date(date, company_id)"/>
2700                             <field name="closing_date" select="1" readonly="1"/>
2701                         </group>
2702                         <group col="2" colspan="2">
2703                             <separator string="Opening Balance" colspan="4"/>
2704                             <field name="balance_start" readonly="1" string="Opening Balance"/>
2705                             <field name="total_entry_encoding"/>
2706                         </group>
2707                         <group col="2" colspan="2">
2708                             <separator string="Closing Balance" colspan="4"/>
2709                             <field name="balance_end"/>
2710                             <field name="balance_end_cash"/>
2711                         </group>
2712                     </group>
2713                     <group col="8" colspan="4">
2714                         <field name="state" widget="statusbar" statusbar_visible="draft,confirm" colspan="4"/>
2715                         <button name="button_cancel" states="confirm,open" string="Cancel" icon="terp-gtk-stop" type="object" groups="base.group_extended"/>
2716                         <button name="button_confirm_cash" states="open" string="Close CashBox" icon="terp-dialog-close" type="object"/>
2717                         <button name="button_open" states="draft" string="Open CashBox" icon="gtk-go-forward" type="object"/>
2718                     </group>
2719                 </form>
2720             </field>
2721         </record>
2722         <record id="account_cash_statement_graph" model="ir.ui.view">
2723             <field name="name">account.bank.statement.graph</field>
2724             <field name="model">account.bank.statement</field>
2725             <field name="type">graph</field>
2726             <field name="arch" type="xml">
2727                 <graph string="Account Statistics" type="bar">
2728                     <field name="date"/>
2729                     <field name="balance_start" operator="+"/>
2730                     <field name="balance_end" operator="+"/>
2731                 </graph>
2732             </field>
2733          </record>
2734         <record id="action_view_bank_statement_tree" model="ir.actions.act_window">
2735             <field name="name">Cash Registers</field>
2736             <field name="type">ir.actions.act_window</field>
2737             <field name="res_model">account.bank.statement</field>
2738             <field name="view_type">form</field>
2739             <field name="view_mode">tree,form,graph</field>
2740             <field name="view_id" ref="view_cash_statement_tree"/>
2741             <field name="search_view_id" ref="view_account_bank_statement_filter"/>
2742             <field name="domain">[('journal_id.type', '=', 'cash')]</field>
2743             <field name="context">{'journal_type':'cash'}</field>
2744             <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>
2745         </record>
2746         <record model="ir.actions.act_window.view" id="act_cash_statement1_all">
2747             <field name="sequence" eval="1"/>
2748             <field name="view_mode">tree</field>
2749             <field name="view_id" ref="view_cash_statement_tree"/>
2750             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2751         </record>
2752         <record model="ir.actions.act_window.view" id="act_cash_statement2_all">
2753             <field name="sequence" eval="1"/>
2754             <field name="view_mode">form</field>
2755             <field name="view_id" ref="view_bank_statement_form2"/>
2756             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2757         </record>
2758         <record model="ir.actions.act_window.view" id="act_cash_statement3_all">
2759             <field name="sequence" eval="1"/>
2760             <field name="view_mode">graph</field>
2761             <field name="view_id" ref="account_cash_statement_graph"/>
2762             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2763         </record>
2764         <menuitem action="action_view_bank_statement_tree" id="journal_cash_move_lines"
2765             parent="menu_finance_bank_and_cash"/>
2766
2767         <menuitem id="menu_account_customer" name="Customers"
2768             parent="menu_finance_receivables"
2769             action="base.action_partner_customer_form" sequence="100"/>
2770
2771         <menuitem id="menu_account_supplier" name="Suppliers"
2772             parent="menu_finance_payables"
2773             action="base.action_partner_supplier_form" sequence="100"/>
2774
2775         <!--
2776             Account Reports
2777         -->
2778
2779         <record id="view_account_financial_report_form" model="ir.ui.view">
2780             <field name="name">account.financial.report.form</field>
2781             <field name="model">account.financial.report</field>
2782             <field name="type">form</field>
2783             <field name="arch" type="xml">
2784                 <form string="Account Report">
2785                     <group col="6" colspan="4">
2786                         <field name="name"/>
2787                         <field name="parent_id"/>
2788                         <field name="sequence"/>
2789                         <field name="type"/>
2790                         <field name="sign"/>
2791                         <field name="style_overwrite"/>
2792                     </group>
2793                     <notebook colspan="6">
2794                         <page string="Report">
2795                             <group colspan="4" col="4">
2796                                 <field name="display_detail" attrs="{'invisible': [('type','not in',['accounts','account_type'])]}"  colspan="2"/>
2797                                 <label string="" colspan="2"/>
2798                             </group>
2799                             <newline/>
2800                             <field name="account_ids" nolabel="1" colspan="6" attrs="{'invisible': [('type', '!=', 'accounts')]}"/>
2801                             <newline/>
2802                             <field name="account_report_id" attrs="{'invisible': [('type', '!=', 'account_report')]}"/>
2803                             <newline/>
2804                             <field name="account_type_ids" nolabel="1" attrs="{'invisible': [('type', '!=', 'account_type')]}"/>
2805                             <newline/>
2806                         </page>
2807                     </notebook>
2808                 </form>
2809             </field>
2810         </record>
2811
2812         <record id="view_account_financial_report_tree" model="ir.ui.view">
2813             <field name="name">account.financial.report.tree</field>
2814             <field name="model">account.financial.report</field>
2815             <field name="type">tree</field>
2816             <field name="arch" type="xml">
2817                 <tree string="Account Report">
2818                     <field name="name"/>
2819                     <field name="parent_id" invisible="1"/>
2820                     <field name="type"/>
2821                     <field name="account_report_id"/>
2822                 </tree>
2823             </field>
2824         </record>
2825
2826         <record id="view_account_financial_report_search" model="ir.ui.view">
2827             <field name="name">account.financial.report.search</field>
2828             <field name="model">account.financial.report</field>
2829             <field name="type">search</field>
2830             <field name="arch" type="xml">
2831                 <search string="Account Report">
2832                     <group>
2833                         <field name="name"/>
2834                         <field name="type"/>
2835                         <field name="account_report_id"/>
2836                     </group>
2837                     <newline/>
2838                     <group expand="0" string="Group By...">
2839                         <filter string="Parent Report" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
2840                         <separator orientation="vertical"/>
2841                         <filter string="Report Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
2842                     </group>
2843                 </search>
2844             </field>
2845         </record>
2846
2847         <record id="action_account_financial_report_tree" model="ir.actions.act_window">
2848             <field name="name">Financial Reports</field>
2849             <field name="type">ir.actions.act_window</field>
2850             <field name="res_model">account.financial.report</field>
2851             <field name="view_type">form</field>
2852             <field name="view_mode">tree,form</field>
2853             <field name="search_view_id" ref="view_account_financial_report_search"/>
2854             <field name="view_id" ref="view_account_financial_report_tree"/>
2855             <field name="help">Makes a generic system to draw financial reports easily.</field>
2856         </record>
2857
2858         <menuitem id="menu_account_financial_reports_tree" name="Account Reports" parent="menu_account_reports" action="action_account_financial_report_tree"/>
2859
2860         <record id="view_account_report_tree_hierarchy" model="ir.ui.view">
2861             <field name="name">account.report.hierarchy</field>
2862             <field name="model">account.financial.report</field>
2863             <field name="type">tree</field>
2864             <field name="field_parent">children_ids</field>
2865             <field name="arch" type="xml">
2866                 <tree string="Account Reports Hierarchy">
2867                     <field name="name"/>
2868                     <field name="type"/>
2869                     <field name="parent_id" invisible="1"/>
2870                     <field name="account_report_id"/>
2871                 </tree>
2872             </field>
2873         </record>
2874         <record id="action_account_report_tree_hierarchy" model="ir.actions.act_window">
2875             <field name="name">Financial Reports Hierarchy</field>
2876             <field name="res_model">account.financial.report</field>
2877             <field name="view_type">tree</field>
2878             <field name="view_id" ref="view_account_report_tree_hierarchy"/>
2879             <field name="domain">[('parent_id','=',False)]</field>
2880         </record>
2881
2882         <menuitem id="menu_account_report_tree_hierarchy" name="Account Reports Hierarchy"
2883                   parent="menu_account_reports" action="action_account_report_tree_hierarchy"/>
2884
2885     </data>
2886 </openerp>