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