[IMP] Account: change sequence of menus and apply the group_no_one
[odoo/odoo.git] / addons / account / account_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <!--
6             Fiscal Year
7         -->
8
9         <record id="view_account_fiscalyear_form" model="ir.ui.view">
10             <field name="name">account.fiscalyear.form</field>
11             <field name="model">account.fiscalyear</field>
12             <field name="type">form</field>
13             <field name="arch" type="xml">
14                 <form string="Fiscalyear">
15                     <group>
16                     <field name="name"/>
17                     <field name="code"/>
18                     <field name="date_start"/>
19                     <field name="date_stop"/>
20                     <field name="company_id" groups="base.group_multi_company"/>
21                     <field name="end_journal_period_id" groups="base.group_extended"/>
22                     </group>
23                     <separator colspan="4" string="Periods"/>
24                     <field colspan="4" name="period_ids" nolabel="1" widget="one2many_list">
25                         <form string="Period">
26                             <field name="name"/>
27                             <field name="code"/>
28                             <field name="date_start"/>
29                             <field name="date_stop"/>
30                             <field name="special"/>
31                         </form>
32                     </field>
33                     <separator colspan="4" string="States"/>
34                     <group>
35                         <field name="state" select="1" readonly="1"/>
36                         <button name="create_period" states="draft" string="Create Monthly Periods" type="object" icon="terp-document-new"/>
37                         <button name="create_period3" states="draft" string="Create 3 Months Periods" type="object" icon="terp-document-new"/>
38                     </group>
39                 </form>
40             </field>
41         </record>
42         <record id="view_account_fiscalyear_tree" model="ir.ui.view">
43             <field name="name">account.fiscalyear.tree</field>
44             <field name="model">account.fiscalyear</field>
45             <field name="type">tree</field>
46             <field name="arch" type="xml">
47                 <tree colors="blue:state == 'draft';gray:state == 'done' " string="Fiscalyear">
48                     <field name="code"/>
49                     <field name="name"/>
50                     <field name="company_id" groups="base.group_multi_company"/>
51                     <field name="state"/>
52                 </tree>
53             </field>
54         </record>
55         <record id="view_account_fiscalyear_search" model="ir.ui.view">
56             <field name="name">account.fiscalyear.search</field>
57             <field name="model">account.fiscalyear</field>
58             <field name="type">search</field>
59             <field name="arch" type="xml">
60                 <search string="Search Fiscalyear">
61                     <group>
62                         <filter string="Open" domain="[('state','=','draft')]" icon="terp-camera_test"/>
63                         <filter string="Closed" domain="[('state','=','done')]" icon="terp-dialog-close"/>
64                         <separator orientation="vertical"/>
65                         <field name="code"/>
66                         <field name="name"/>
67                         <field name="state"/>
68                     </group>
69                     <newline/>
70                     <group expand="0" string="Group By...">
71                         <filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
72                     </group>
73                 </search>
74             </field>
75         </record>
76         <record id="action_account_fiscalyear_form" model="ir.actions.act_window">
77             <field name="name">Fiscal Years</field>
78             <field name="res_model">account.fiscalyear</field>
79             <field name="view_type">form</field>
80             <field name="view_mode">tree,form</field>
81             <field name="help">Define your company's financial year according to your needs. A financial year is a period at the end of which a company's accounts are made up (usually 12 months). The financial year is usually referred to by the date in which it ends. For example, if a company's financial year ends November 30, 2011, then everything between December 1, 2010 and November 30, 2011  would be referred to as FY 2011. You are not obliged to follow the actual calendar year.</field>
82         </record>
83         <menuitem id="next_id_23" name="Periods" parent="account.menu_finance_configuration" sequence="5" />
84         <menuitem action="action_account_fiscalyear_form" id="menu_action_account_fiscalyear_form" parent="next_id_23"/>
85
86         <!--
87             Period
88         -->
89
90         <record id="view_account_period_form" model="ir.ui.view">
91             <field name="name">account.period.form</field>
92             <field name="model">account.period</field>
93             <field name="type">form</field>
94             <field name="arch" type="xml">
95                 <form string="Period">
96                     <field name="name"/>
97                     <field name="code"/>
98                     <field name="date_start"/>
99                     <field name="date_stop"/>
100                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
101                     <field name="fiscalyear_id" widget="selection"/>
102                     <field name="special"/>
103                     <separator colspan="4" string="States"/>
104                     <field name="state"/>
105                     <button name="action_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert" groups="account.group_account_manager"/>
106                 </form>
107             </field>
108         </record>
109         <record id="view_account_period_tree" model="ir.ui.view">
110             <field name="name">account.period.tree</field>
111             <field name="model">account.period</field>
112             <field name="type">tree</field>
113             <field name="arch" type="xml">
114               <tree colors="blue:state == 'draft';gray:state == 'done' " string="Period">
115                     <field name="name"/>
116                     <field name="code"/>
117                     <field name="date_start"/>
118                     <field name="date_stop"/>
119                     <field name="special"/>
120                     <field name="company_id" groups="base.group_multi_company"/>
121                     <field name="state"/>
122                     <button name="action_draft" states="done" string="Set to Draft" type="object" icon="terp-document-new" groups="account.group_account_manager"/>
123                     <button name="%(action_account_period_close)d" states="draft" string="Close Period" type="action" icon="terp-camera_test"/>
124                 </tree>
125             </field>
126         </record>
127
128         <record id="view_account_period_search" model="ir.ui.view">
129             <field name="name">account.period.search</field>
130             <field name="model">account.period</field>
131             <field name="type">search</field>
132             <field name="arch" type="xml">
133                 <search string="Search Period">
134                     <group>
135                         <filter string="To Close" name="draft" domain="[('state','=','draft')]" icon="terp-dialog-close"/>
136                         <separator orientation="vertical"/>
137                         <field name="name"/>
138                         <field name="code"/>
139                     </group>
140                 </search>
141             </field>
142         </record>
143
144         <record id="action_account_period_form" model="ir.actions.act_window">
145             <field name="name">Periods</field>
146             <field name="res_model">account.period</field>
147             <field name="view_type">form</field>
148             <field name="view_mode">tree,form</field>
149             <field name="context">{'search_default_draft': 1}</field>
150             <field name="help">Here you can define a financial period, an interval of time in your company's financial year. An accounting period typically is a month or a quarter. It usually corresponds to the periods of the tax declaration. Create and manage periods from here and decide whether a period should be closed or left open depending on your company's activities over a specific period.</field>
151         </record>
152         <menuitem action="action_account_period_form" id="menu_action_account_period_form" parent="account.next_id_23" groups="base.group_no_one"/>
153
154
155         <!--
156             Accounts
157         -->
158         <record id="view_account_form" model="ir.ui.view">
159             <field name="name">account.account.form</field>
160             <field name="model">account.account</field>
161             <field name="type">form</field>
162             <field name="arch" type="xml">
163                 <form string="Account">
164                     <group col="6" colspan="4">
165                         <field name="name" select="1"/>
166                         <field name="code" select="1"/>
167                         <field name="company_id" widget="selection" groups="base.group_multi_company"/>
168                         <newline/>
169                         <field name="parent_id"/>
170                         <field name="type" select="1"/>
171                         <field name="user_type" select="1"/>
172                         <field name="active" groups="base.group_extended" />
173                         <newline/>
174                         <field name="debit" invisible="context.get('config_invisible', True)" attrs="{'readonly':[('type','=','view')]}"/>
175                         <field name="credit" invisible="context.get('config_invisible', True)" attrs="{'readonly':[('type','=','view')]}"/>
176                         <field name="balance" invisible="context.get('config_invisible', True)"/>
177                     </group>
178                     <notebook colspan="4">
179                         <page string="General Information">
180                             <newline/>
181                             <group col="2" colspan="2">
182                                 <separator string="Currency" colspan="2"/>
183                                 <field name="currency_id"/>
184                                 <field name="currency_mode" attrs="{'readonly': [('currency_id','=',False)]}"/>
185                             </group>
186                             <group col="2" colspan="2">
187                                 <separator string="Reconcile" colspan="2"/>
188                                 <field name="reconcile"/>
189                             </group>
190                             <separator string="Default Taxes" colspan="4"/>
191                             <field colspan="4" name="tax_ids" nolabel="1" domain="[('parent_id','=',False)]"/>
192                             <separator string="Consolidated Children" colspan="4"/>
193                             <field name="child_consol_ids" colspan="4" nolabel="1" attrs="{'readonly':[('type','!=','consolidation')]}"/>
194                         </page>
195                         <page string="Notes">
196                             <field colspan="4" name="note" nolabel="1"/>
197                         </page>
198                     </notebook>
199                 </form>
200             </field>
201         </record>
202
203         <record id="view_account_search" model="ir.ui.view">
204             <field name="name">account.account.search</field>
205             <field name="model">account.account</field>
206             <field name="type">search</field>
207             <field name="arch" type="xml">
208                 <search string="Accounts">
209                     <group>
210                         <filter icon="terp-sale" string="Receivable Accounts" domain="[('type','=','receivable')]"/>
211                         <filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
212                         <separator orientation="vertical"/>
213                         <field name="code"/>
214                         <field name="name"/>
215                         <field name="user_type"/>
216                     </group>
217                     <newline/>
218                     <group expand="0" string="Group By...">
219                         <filter string="Parent Account" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
220                         <separator orientation="vertical"/>
221                         <filter string="Account Type" icon="terp-stock_symbol-selection" domain="" context="{'group_by':'user_type'}"/>
222                         <filter string="Internal Type" icon="terp-stock_symbol-selection" domain="" context="{'group_by':'type'}"/>
223                     </group>
224                 </search>
225             </field>
226         </record>
227
228         <record id="view_account_list" model="ir.ui.view">
229             <field name="name">account.account.list</field>
230             <field name="model">account.account</field>
231             <field name="type">tree</field>
232             <field name="field_parent">child_id</field>
233             <field name="arch" type="xml">
234                 <tree colors="blue:type == 'view';black:type in ('other','receivable','payable','consolidation');gray:type == 'closed'" string="Chart of accounts" toolbar="1" >
235                     <field name="code"/>
236                     <field name="name"/>
237                     <field name="parent_id" invisible="1"/>
238                     <field name="user_type" invisible="1"/>
239                     <field name="debit"/>
240                     <field name="credit"/>
241                     <field name="balance"/>
242                     <field name="type"/>
243                     <field name="company_id" groups="base.group_multi_company"/>
244                     <field name="company_currency_id"/>
245                 </tree>
246             </field>
247         </record>
248         <record id="view_treasory_graph" model="ir.ui.view">
249            <field name="name">account.treasury.graph</field>
250            <field name="model">account.account</field>
251            <field name="type">graph</field>
252            <field name="arch" type="xml">
253                <graph string="Treasury Analysis" type="bar">
254                   <field name="name"/>
255                   <field name="balance" operator="+"/>
256                </graph>
257          </field>
258       </record>
259         <record id="action_account_form" model="ir.actions.act_window">
260             <field name="name">Accounts</field>
261             <field name="res_model">account.account</field>
262             <field name="view_type">form</field>
263             <field name="view_mode">tree,form,graph</field>
264             <field name="search_view_id" ref="view_account_search"/>
265             <field name="view_id" ref="view_account_list"/>
266             <field name="help">Create and manage the accounts you need to record journal entries. An account is part of a ledger allowing your company to register all kinds of debit and credit transactions. Companies present their annual accounts in two main parts: the balance sheet and the income statement (profit and loss account). The annual accounts of a company are required by law to disclose a certain amount of information. They have to be certified by an external auditor annually.</field>
267         </record>
268         <menuitem id="account_account_menu" name="Accounts" parent="account.menu_finance_configuration" sequence="15"/>
269         <menuitem action="action_account_form" id="menu_action_account_form" parent="account_account_menu"/>
270
271         <record id="view_account_tree" model="ir.ui.view">
272             <field name="name">account.account.tree</field>
273             <field name="model">account.account</field>
274             <field name="type">tree</field>
275             <field name="field_parent">child_id</field>
276             <field name="arch" type="xml">
277                 <tree colors="blue:type == 'view';black:type in ('other','receivable','payable','consolidation');gray:type == 'closed'" string="Chart of accounts" toolbar="1" >
278                     <field name="code"/>
279                     <field name="name"/>
280                     <field name="debit"/>
281                     <field name="credit"/>
282                     <field name="balance"/>
283                     <field name="company_currency_id"/>
284                     <field name="company_id" groups="base.group_multi_company"/>
285                     <field name="type"/>
286                     <field name="parent_id" invisible="1"/>
287                 </tree>
288             </field>
289         </record>
290         <record id="action_account_tree" model="ir.actions.act_window">
291             <field name="name">Chart of Accounts</field>
292             <field name="res_model">account.account</field>
293             <field name="view_type">tree</field>
294             <field name="view_id" ref="view_account_tree"/>
295             <field name="domain">[('parent_id','=',False)]</field>
296         </record>
297
298          <record id="view_account_gain_loss_tree" model="ir.ui.view">
299            <field name="name">Unrealized Gain or Loss</field>
300             <field name="model">account.account</field>
301             <field name="type">tree</field>
302             <field name="arch" type="xml">
303                 <tree string="Unrealized Gains and losses">
304                     <field name="code"/>
305                     <field name="name"/>
306                     <field name="parent_id" invisible="1"/>
307                     <field name="user_type" invisible="1"/>
308                     <field name="type" invisible="1"/>
309                     <field name="currency_id"/>
310                     <field name="exchange_rate"/>
311                     <field name="foreign_balance"/>
312                     <field name="adjusted_balance"/>
313                     <field name="balance"/>
314                     <field name="unrealized_gain_loss"/>
315                 </tree>
316             </field>
317         </record>
318
319           <record id="action_account_gain_loss" model="ir.actions.act_window">
320             <field name="name">Unrealized Gain or Loss</field>
321             <field name="res_model">account.account</field>
322             <field name="view_type">form</field>
323             <field name="view_mode">tree</field>
324             <field name="view_id" ref="view_account_gain_loss_tree"/>
325             <field name="domain">[('currency_id','!=',False)]</field>
326             <field name="help">When doing multi-currency transactions, you may loose or gain some amount due to changes of exchange rate. This menu gives you a forecast of the Gain or Loss you'd realized if those transactions were ended today. Only for accounts having a secondary currency set.</field>
327         </record>
328
329         <menuitem
330             name="Unrealized Gain or Loss"
331             action="action_account_gain_loss"
332             groups="account.group_account_user"
333             id="menu_unrealized_gains_losses"
334             parent="account.menu_multi_currency"/>
335
336         <!--
337         Journal
338
339         Account Journal Columns
340         -->
341
342         <record id="view_journal_column_form" model="ir.ui.view">
343             <field name="name">account.journal.column.form</field>
344             <field name="model">account.journal.column</field>
345             <field name="type">form</field>
346             <field name="arch" type="xml">
347                 <form string="Journal Column">
348                     <field colspan="4" name="name" select="1"/>
349                     <field name="field" select="1"/>
350                     <field name="sequence"/>
351                 </form>
352             </field>
353         </record>
354         <record id="view_journal_column_tree" model="ir.ui.view">
355             <field name="name">account.journal.column.tree</field>
356             <field name="model">account.journal.column</field>
357             <field name="type">tree</field>
358             <field name="arch" type="xml">
359                 <tree string="Journal Column">
360                     <field name="sequence"/>
361                     <field name="name"/>
362                 </tree>
363             </field>
364         </record>
365
366         <record id="view_account_journal_view_search" model="ir.ui.view">
367             <field name="name">account.journal.view.search</field>
368             <field name="model">account.journal.view</field>
369             <field name="type">search</field>
370             <field name="arch" type="xml">
371                 <search string="Journal View">
372                     <field name="name"/>
373                 </search>
374             </field>
375         </record>
376         <record id="view_account_journal_view_tree" model="ir.ui.view">
377             <field name="name">account.journal.view.tree</field>
378             <field name="model">account.journal.view</field>
379             <field name="type">tree</field>
380             <field name="arch" type="xml">
381                 <tree string="Journal View">
382                     <field name="name"/>
383                 </tree>
384             </field>
385         </record>
386         <record id="view_account_journal_view_form" model="ir.ui.view">
387             <field name="name">account.journal.view.form</field>
388             <field name="model">account.journal.view</field>
389             <field name="type">form</field>
390             <field name="arch" type="xml">
391                 <form string="Journal View">
392                     <field name="name"/>
393                     <field colspan="4" name="columns_id" nolabel="1" widget="one2many_list"/>
394                 </form>
395             </field>
396         </record>
397         <record id="action_account_journal_view" model="ir.actions.act_window">
398             <field name="name">Journal Views</field>
399             <field name="res_model">account.journal.view</field>
400             <field name="view_type">form</field>
401             <field name="view_mode">tree,form</field>
402             <field name="search_view_id" ref="view_account_journal_view_search"/>
403             <field name="help">Here you can customize an existing journal view or create a new view. Journal views determine the way you can record entries in your journal. Select the fields you want to appear in a journal and determine the sequence in which they will appear. Then you can create a new journal and link your view to it.</field>
404         </record>
405
406         <menuitem action="action_account_journal_view" id="menu_action_account_journal_view" parent="account.menu_journals" sequence="20"  groups="base.group_extended"/>
407
408         <!--
409     # Account Journal
410     -->
411
412         <record id="view_account_journal_tree" model="ir.ui.view">
413             <field name="name">account.journal.tree</field>
414             <field name="model">account.journal</field>
415             <field name="type">tree</field>
416             <field name="arch" type="xml">
417                 <tree string="Account Journal">
418                     <field name="code"/>
419                     <field name="name"/>
420                     <field name="type"/>
421                     <field name="user_id"/>
422                     <field name="company_id" groups="base.group_multi_company"/>
423                 </tree>
424             </field>
425         </record>
426         <record id="view_account_journal_search" model="ir.ui.view">
427             <field name="name">account.journal.search</field>
428             <field name="model">account.journal</field>
429             <field name="type">search</field>
430             <field name="arch" type="xml">
431                 <search string="Search Account Journal">
432                     <group>
433                     <filter domain="['|', ('type', '=', 'sale'), ('type', '=', 'sale_refund')]" string="Sale" icon="terp-camera_test"/>
434                     <filter domain="['|', ('type', '=', 'purchase'), ('type', '=', 'purchase_refund')]" string="Purchase" icon="terp-purchase"/>
435                    <filter domain="['|', ('type', '=', 'cash'), ('type', '=', 'bank')]" string="Liquidity" icon="terp-dolar"/>
436                     <filter domain="['|', ('type', '=', 'general'), ('type', '=', 'situation')]" string="Others" icon="terp-stock"/>
437                     <separator orientation="vertical"/>
438                     <field name="code"/>
439                     <field name="name"/>
440                     <field name="user_id"/>
441                     </group>
442                     <newline/>
443                     <group expand="0" string="Group By...">
444                     <filter string="User" context="{'group_by':'user_id'}" icon="terp-personal"/>
445                     <separator orientation="vertical"/>
446                     <filter string="Type" context="{'group_by':'type'}" icon="terp-stock_symbol-selection"/>
447                     </group>
448                 </search>
449             </field>
450         </record>
451         <record id="view_account_journal_form" model="ir.ui.view">
452             <field name="name">account.journal.form</field>
453             <field name="model">account.journal</field>
454             <field name="type">form</field>
455             <field name="arch" type="xml">
456                 <form string="Account Journal">
457                     <group colspan="4" col="6">
458                         <field name="name" select="1"/>
459                         <field name="code" select="1"/>
460                         <field name="type" on_change="onchange_type(type, currency, context)"/>
461                     </group>
462                     <notebook colspan="4">
463                         <page string="General Information">
464                             <group col="2" colspan="2">
465                                 <group colspan="2" col="2">
466                                     <separator string="Accounts" colspan="4"/>
467                                     <field name="default_debit_account_id" attrs="{'required':[('type','in', ('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
468                                     <field name="default_credit_account_id" attrs="{'required':[('type','in',('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
469                                 </group>
470                                 <group colspan="2" col="2">
471                                     <separator string="Journal View" colspan="4"/>
472                                     <field name="view_id" widget="selection"/>
473                                 </group>
474                             </group>
475
476                             <group colspan="2" col="2">
477                                 <separator string="Company" colspan="4"/>
478                                 <field name="company_id" groups="base.group_multi_company"/>
479                                 <field name="user_id" groups="base.group_extended"/>
480                                 <field name="currency" groups="base.group_extended"/>
481                             </group>
482                             <group colspan="2" col="2" groups="base.group_extended">
483                                 <separator string="Validations" colspan="4"/>
484                                 <field name="allow_date"/>
485                             </group>
486                             <group colspan="2" col="2">
487                                 <separator string="Other Configuration" colspan="4"/>
488                                 <field name="centralisation" groups="base.group_extended"/>
489                                 <field name="entry_posted"/>
490                             </group>
491                             <group colspan="2" col="2">
492                                 <separator string="Invoicing Data" colspan="4"/>
493 <!--                                <field name="invoice_sequence_id"/>-->
494                                 <field name="group_invoice_lines"/>
495                             </group>
496                             <group colspan="2" col="2"> <!-- can't set the field as hidden for certain groups as it's required in the object and not in the view, and GTK doesn't handle that correctly -->
497                                 <separator string="Sequence" colspan="4"/>
498                                 <field name="sequence_id" required="0"/>
499                             </group>
500                         </page>
501                         <page string="Entry Controls" groups="base.group_extended">
502                             <separator colspan="4" string="Accounts Type Allowed (empty for no control)"/>
503                             <field colspan="4" name="type_control_ids" nolabel="1"/>
504                             <separator colspan="4" string="Accounts Allowed (empty for no control)"/>
505                             <field colspan="4" name="account_control_ids" nolabel="1"/>
506                         </page>
507                     </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_no_one"/>
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_configuration" sequence="20"/>
927        <menuitem action="action_tax_code_list" id="menu_action_tax_code_list" parent="next_id_27" sequence="12" groups="base.group_no_one"/>
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_view_move_line" model="ir.actions.act_window">
1280             <field name="name">Lines to reconcile</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="domain">[('account_id.reconcile', '=', True),('reconcile_id','=',False)]</field>
1285             <field eval="False" name="view_id"/>
1286             <field eval="True" name="filter"/>
1287             <field name="search_view_id" ref="view_account_move_line_filter"/>
1288         </record>
1289
1290         <record id="action_move_line_select" model="ir.actions.act_window">
1291             <field name="name">Journal Items</field>
1292             <field name="res_model">account.move.line</field>
1293             <field name="view_type">form</field>
1294             <field name="view_mode">tree,form</field>
1295             <field name="view_id" ref="view_move_line_tree"/>
1296             <field name="search_view_id" ref="view_account_move_line_filter"/>
1297             <field name="context">{'search_default_account_id': [active_id]}</field>
1298         </record>
1299
1300         <record id="ir_account_move_line_select" model="ir.values">
1301             <field name="key2">tree_but_open</field>
1302             <field name="model">account.account</field>
1303             <field name="name">Open Journal Items</field>
1304             <field eval="'ir.actions.act_window,%d'%action_move_line_select" name="value"/>
1305         </record>
1306         <!--
1307     Account.Entry Edition
1308     -->
1309
1310         <record id="account_move_graph" model="ir.ui.view">
1311             <field name="name">account.move.graph</field>
1312             <field name="model">account.move</field>
1313             <field name="type">graph</field>
1314             <field name="arch" type="xml">
1315                 <graph string="Account Statistics" type="bar">
1316                     <field name="period_id"/>
1317                     <field name="amount" operator="+"/>
1318                 </graph>
1319             </field>
1320          </record>
1321         <record id="view_move_tree" model="ir.ui.view">
1322             <field name="name">account.move.tree</field>
1323             <field name="model">account.move</field>
1324             <field name="type">tree</field>
1325             <field name="arch" type="xml">
1326                 <tree colors="blue:state == 'draft';black:state == 'posted'" string="Journal Entries">
1327                     <field name="name"/>
1328                     <field name="ref"/>
1329                     <field name="date"/>
1330                     <field name="period_id"/>
1331                     <field name="journal_id"/>
1332                     <field name="partner_id"/>
1333                     <field name="amount" sum="Total Amount"/>
1334                     <field name="to_check" groups="base.group_extended"/>
1335                     <field name="state"/>
1336                     <button name="button_validate" states="draft" string="Approve" type="object" icon="terp-camera_test"/>
1337                 </tree>
1338             </field>
1339         </record>
1340         <record id="view_move_form" model="ir.ui.view">
1341             <field name="name">account.move.form</field>
1342             <field name="model">account.move</field>
1343             <field name="type">form</field>
1344             <field name="arch" type="xml">
1345                 <form string="Journal Entries">
1346                     <group colspan="4" col="6">
1347                         <field name="name" readonly="True"/>
1348                         <field name="ref"/>
1349                         <field name="to_check" groups="base.group_extended"/>
1350                         <field name="journal_id"/>
1351                         <field name="period_id"/>
1352                         <field name="date"/>
1353                         <field name="company_id" required="1" groups="base.group_multi_company"/>
1354                         <field name="partner_id" invisible="1"/>
1355                         <field name="amount" invisible="1"/>
1356                     </group>
1357                     <notebook colspan="4">
1358                         <page string="Journal Items">
1359                             <field name="balance" invisible="1"/>
1360                             <field colspan="4" name="line_id" nolabel="1" height="250" widget="one2many_list" 
1361                             on_change="onchange_line_id(line_id)"
1362                             context="{'balance': balance , 'journal': journal_id }">
1363                                 <form string="Journal Item">
1364                                     <group col="6" colspan="4">
1365                                         <field name="name"/>
1366                                         <field name="ref"/>
1367                                         <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
1368
1369                                         <field name="journal_id"/>
1370                                         <field name="period_id"/>
1371                                         <field name="company_id" required="1" groups="base.group_multi_company"/>
1372                                     </group>
1373                                     <notebook colspan="4">
1374                                         <page string="Information">
1375                                             <group col="2" colspan="2">
1376                                                 <separator colspan="2" string="Amount"/>
1377                                                 <field name="account_id" domain="[('company_id', '=', parent.company_id), ('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
1378                                                 <field name="debit"/>
1379                                                 <field name="credit"/>
1380                                                 <field name="quantity"/>
1381                                             </group>
1382
1383                                             <group col="2" colspan="2">
1384                                                 <separator colspan="2" string="Accounting Documents"/>
1385                                                 <field name="invoice"/>
1386                                                 <field name="move_id" required="False"/>
1387                                                 <field name="statement_id"/>
1388                                             </group>
1389
1390                                             <group col="2" colspan="2">
1391                                                 <separator colspan="2" string="Dates"/>
1392                                                 <field name="date"/>
1393                                                 <field name="date_maturity"/>
1394                                                 <field name="date_created"/>
1395                                             </group>
1396
1397                                             <group col="2" colspan="2">
1398                                                 <separator colspan="2" string="Taxes"/>
1399                                                 <field name="tax_code_id"/>
1400                                                 <field name="tax_amount"/>
1401                                                 <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1402                                             </group>
1403
1404                                             <group col="2" colspan="2">
1405                                                 <separator colspan="2" string="Currency"/>
1406                                                 <field name="currency_id"/>
1407                                                 <field name="amount_currency"/>
1408                                             </group>
1409
1410                                             <group col="2" colspan="2">
1411                                                 <separator colspan="2" string="Reconciliation"/>
1412                                                 <field name="reconcile_id"/>
1413                                                 <field name="reconcile_partial_id"/>
1414                                             </group>
1415
1416                                             <group col="2" colspan="2">
1417                                                 <separator colspan="2" string="States"/>
1418                                                 <field name="state"/>
1419                                                 <field name="blocked"/>
1420                                             </group>
1421
1422                                             <group col="2" colspan="2" groups="base.group_extended">
1423                                                 <separator colspan="2" string="Analytic"/>
1424                                                 <field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="analytic.group_analytic_accounting"/>
1425                                             </group>
1426                                             <separator string="Internal Note" colspan="4"/>
1427                                             <field name="narration" colspan="4" nolabel="1"/>
1428                                         </page>
1429                                         <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1430                                             <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)}"/>
1431                                         </page>
1432                                     </notebook>
1433                                 </form>
1434                                 <tree colors="blue:state == 'draft';black:state == 'posted'" editable="top" string="Journal Items">
1435                                     <field name="ref"/>
1436                                     <field name="invoice"/>
1437                                     <field name="name"/>
1438                                     <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
1439                                     <field name="account_id" domain="[('journal_id','=',parent.journal_id),('company_id', '=', parent.company_id)]"/>
1440                                     <field name="date_maturity"/>
1441                                     <field name="debit" sum="Total Debit"/>
1442                                     <field name="credit" sum="Total Credit"/>
1443                                     <field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="analytic.group_analytic_accounting"/>
1444                                     <field name="amount_currency" groups="base.group_extended"/>
1445                                     <field name="currency_id" groups="base.group_extended"/>
1446                                     <field name="tax_code_id"/>
1447                                     <field name="tax_amount"/>
1448                                     <field name="state"/>
1449                                     <field name="reconcile_id"/>
1450                                     <field name="reconcile_partial_id" groups="base.group_extended"/>
1451                                 </tree>
1452                             </field>
1453                             <separator colspan="4" string="Internal Note"/>
1454                             <field name="narration" colspan="4" nolabel="1" height="50"/>
1455                             <group col="4" colspan="4">
1456                                 <field name="state" select="1"/>
1457                                 <button name="button_cancel" states="posted" string="Cancel" type="object" icon="gtk-cancel"/>
1458                                 <button name="button_validate" states="draft" string="Post" type="object" icon="terp-camera_test"/>
1459                             </group>
1460                         </page>
1461                     </notebook>
1462                 </form>
1463             </field>
1464         </record>
1465
1466         <record id="view_account_move_filter" model="ir.ui.view">
1467             <field name="name">account.move.select</field>
1468             <field name="model">account.move</field>
1469             <field name="type">search</field>
1470             <field name="arch" type="xml">
1471                 <search string="Search Move">
1472                     <group>
1473                         <filter icon="terp-document-new" string="Unposted" domain="[('state','=','draft')]" help="Unposted Journal Entries"/>
1474                         <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Journal Entries"/>
1475                         <separator orientation="vertical"/>
1476                         <filter icon="terp-gtk-jump-to-ltr" string="To Review" domain="[('to_check','=',True)]" groups="base.group_extended" help="Journal Entries to Review"/>
1477                         <separator orientation="vertical"/>
1478                         <field name="name"/>
1479                         <field name="ref"/>
1480                         <field name="partner_id"/>
1481                         <field name="date"/>
1482                     </group>
1483                     <newline/>
1484                     <group>
1485                         <field name="journal_id" widget="selection"/>
1486                         <field name="period_id"/>
1487                     </group>
1488                     <newline/>
1489                     <group expand="0" string="Group By...">
1490                         <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
1491                         <separator orientation="vertical"/>
1492                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1493                         <filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
1494                         <separator orientation="vertical"/>
1495                         <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
1496                         <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
1497                     </group>
1498                 </search>
1499             </field>
1500         </record>
1501
1502         <record id="action_move_journal_line" model="ir.actions.act_window">
1503             <field name="name">Journal Entries</field>
1504             <field name="res_model">account.move</field>
1505             <field name="view_type">form</field>
1506             <field name="view_mode">tree,form,graph</field>
1507             <field name="view_id" ref="view_move_tree"/>
1508             <field name="search_view_id" ref="view_account_move_filter"/>
1509             <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>
1510         </record>
1511
1512         <menuitem
1513             icon="STOCK_JUSTIFY_FILL"
1514             action="action_move_journal_line"
1515             id="menu_action_move_journal_line_form"
1516             parent="account.menu_finance_entries"
1517             groups="group_account_user"
1518             sequence="5"/>
1519
1520         <record id="action_move_line_form" model="ir.actions.act_window">
1521             <field name="name">Entries</field>
1522             <field name="type">ir.actions.act_window</field>
1523             <field name="res_model">account.move</field>
1524             <field name="view_type">form</field>
1525             <field name="view_id" ref="view_move_tree"/>
1526             <field name="search_view_id" ref="view_account_move_filter"/>
1527         </record>
1528
1529         <act_window
1530             id="act_account_move_to_account_move_line_open"
1531             name="Journal Items"
1532             context="{'search_default_move_id':[active_id], 'default_move_id': active_id}"
1533             res_model="account.move.line"
1534             src_model="account.move"/>
1535
1536         <record id="action_move_line_search" model="ir.actions.act_window">
1537             <field name="name">Journal Items</field>
1538             <field name="type">ir.actions.act_window</field>
1539             <field name="res_model">account.move.line</field>
1540             <field name="view_type">form</field>
1541             <field name="view_mode">tree,form</field>
1542             <field name="view_id" ref="view_move_line_tree"/>
1543             <field name="search_view_id" ref="view_account_move_line_filter"/>
1544         </record>
1545         <record id="action_move_line_search_view1" model="ir.actions.act_window.view">
1546             <field eval="10" name="sequence"/>
1547             <field name="view_mode">tree</field>
1548             <field name="view_id" ref="view_move_line_tree"/>
1549             <field name="act_window_id" ref="action_move_line_search"/>
1550         </record>
1551         <record id="action_move_line_search_view2" model="ir.actions.act_window.view">
1552             <field eval="11" name="sequence"/>
1553             <field name="view_mode">form</field>
1554             <field name="act_window_id" ref="action_move_line_search"/>
1555         </record>
1556
1557         <act_window
1558             context="{'search_default_next_partner':1,'view_mode':True}"
1559             id="action_account_manual_reconcile" name="Journal Items"
1560             res_model="account.move.line"
1561             view_id="view_move_line_tree"/>
1562
1563
1564         <menuitem
1565              name="Manual Reconciliation" icon="STOCK_EXECUTE"
1566              action="action_account_manual_reconcile"
1567              id="menu_manual_reconcile"
1568              parent="account.periodical_processing_reconciliation"/>
1569
1570
1571         <act_window
1572             id="act_account_acount_move_line_open"
1573             name="Entries"
1574             context="{'search_default_account_id':[active_id], 'search_default_unreconciled':0, 'default_account_id': active_id}"
1575             res_model="account.move.line"
1576             src_model="account.account"/>
1577
1578         <act_window
1579             id="act_account_acount_move_line_open_unreconciled"
1580             name="Unreconciled Entries"
1581             res_model="account.move.line"
1582             context="{'search_default_account_id':[active_id], 'search_default_unreconciled':1, 'default_account_id': active_id}"
1583             src_model="account.account"/>
1584
1585         <act_window
1586             domain="[('reconcile_id', '=', active_id)]"
1587             id="act_account_acount_move_line_reconcile_open"
1588             name="Reconciled entries"
1589             res_model="account.move.line"
1590             src_model="account.move.reconcile"/>
1591
1592
1593         <!--
1594     TODO:
1595         Print Journal (and change state)
1596         Close Journal (and verify that there is no draft Entry Lines)
1597 -->
1598
1599         <record id="view_journal_period_tree" model="ir.ui.view">
1600             <field name="name">account.journal.period.tree</field>
1601             <field name="model">account.journal.period</field>
1602             <field name="type">tree</field>
1603             <field name="arch" type="xml">
1604                 <tree colors="blue:state == 'draft';gray:state == 'done';black:state == 'printed'" string="Journals">
1605                     <field icon="icon" name="fiscalyear_id"/>
1606                     <field name="period_id"/>
1607                     <field name="journal_id"/>
1608                     <field name="state"/>
1609                     <field name="company_id" groups="base.group_multi_company"/>
1610                 </tree>
1611             </field>
1612         </record>
1613         <record id="action_account_journal_period_tree" model="ir.actions.act_window">
1614             <field name="name">Journals</field>
1615             <field name="res_model">account.journal.period</field>
1616             <field name="view_type">tree</field>
1617             <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>
1618         </record>
1619
1620         <!--
1621         # Account Models
1622         -->
1623
1624         <record id="view_model_line_tree" model="ir.ui.view">
1625             <field name="name">account.model.line.tree</field>
1626             <field name="model">account.model.line</field>
1627             <field name="type">tree</field>
1628             <field name="arch" type="xml">
1629                 <tree string="Journal Entry Model Line" editable="bottom">
1630                     <field name="sequence"/>
1631                     <field name="name"/>
1632                     <field name="account_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation'), ('company_id', '=', parent.company_id)]"/>
1633                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1634                     <field name="partner_id"/>
1635                     <field name="debit"/>
1636                     <field name="credit"/>
1637                     <field name="date_maturity"/>
1638                 </tree>
1639             </field>
1640         </record>
1641
1642
1643         <record id="view_model_line_form" model="ir.ui.view">
1644             <field name="name">account.model.line.form</field>
1645             <field name="model">account.model.line</field>
1646             <field name="type">form</field>
1647             <field name="arch" type="xml">
1648                 <form string="Journal Entry Model Line">
1649                     <field colspan="4" name="name" select="1"/>
1650                     <field name="sequence"/>
1651                     <field name="account_id" domain="[('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation'), ('company_id', '=', parent.company_id)]"/>
1652                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1653                     <field name="partner_id"/>
1654                     <field name="debit" select="1"/>
1655                     <field name="credit" select="1"/>
1656                     <field name="quantity"/>
1657                     <field name="date_maturity"/>
1658                 </form>
1659             </field>
1660         </record>
1661
1662         <record id="view_model_form" model="ir.ui.view">
1663             <field name="name">account.model.form</field>
1664             <field name="model">account.model</field>
1665             <field name="type">form</field>
1666             <field name="arch" type="xml">
1667                 <form string="Journal Entry Model">
1668                     <field name="name"/>
1669                     <field name="journal_id"/>
1670                     <field name="company_id" widget='selection' groups="base.group_multi_company"/>
1671                     <field colspan="4" nolabel="1" name="lines_id" height="250" widget="one2many_list"/>
1672                     <separator string="Legend" colspan="4"/>
1673                     <field name="legend" colspan="4" nolabel="1"/>
1674                     <group col="1" colspan="4">
1675                         <button name="%(action_account_use_model_create_entry)d" string="Create entries" type="action" icon="gtk-execute"/>
1676                     </group>
1677                 </form>
1678             </field>
1679         </record>
1680
1681         <record id="view_model_tree" model="ir.ui.view">
1682             <field name="name">account.model.tree</field>
1683             <field name="model">account.model</field>
1684             <field name="type">tree</field>
1685             <field name="arch" type="xml">
1686                 <tree string="Journal Entry Model">
1687                     <field name="name"/>
1688                     <field name="journal_id"/>
1689                     <field name="company_id" groups="base.group_multi_company"/>
1690                 </tree>
1691             </field>
1692         </record>
1693
1694         <record id="view_model_search" model="ir.ui.view">
1695             <field name="name">account.model.search</field>
1696             <field name="model">account.model</field>
1697             <field name="type">search</field>
1698             <field name="arch" type="xml">
1699                 <search string="Journal Entry Model">
1700                   <group>
1701                     <filter string="Sale" icon="terp-camera_test" domain="[('journal_id.type', '=', 'sale')]"/>
1702                     <filter string="Purchase" icon="terp-purchase" domain="[('journal_id.type', '=', 'purchase')]"/>
1703                     <separator orientation="vertical"/>
1704                       <field name="name"/>
1705                       <field name="journal_id" widget="selection"/>
1706                       <field name="company_id" widget="selection" groups="base.group_multi_company"/>
1707                     </group>
1708                     <newline/>
1709                     <group expand="0" string="Group By...">
1710                       <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1711                     </group>
1712                 </search>
1713             </field>
1714         </record>
1715
1716         <record id="action_model_form" model="ir.actions.act_window">
1717             <field name="name">Recurring Models</field>
1718             <field name="res_model">account.model</field>
1719             <field name="view_type">form</field>
1720             <field name="view_mode">tree,form</field>
1721             <field name="search_view_id" ref="view_model_search"/>
1722         </record>
1723         <menuitem
1724             action="action_model_form" id="menu_action_model_form" sequence="5"
1725             parent="account.menu_configuration_misc" groups="base.group_extended"/>
1726
1727         <!--
1728             # Payment Terms
1729         -->
1730
1731         <record id="view_payment_term_line_tree" model="ir.ui.view">
1732             <field name="name">account.payment.term.line.tree</field>
1733             <field name="model">account.payment.term.line</field>
1734             <field name="type">tree</field>
1735             <field name="arch" type="xml">
1736                 <tree string="Payment Term">
1737                     <field name="sequence"/>
1738                     <field name="name"/>
1739                     <field name="value"/>
1740                     <field name="value_amount"/>
1741                     <field name="days"/>
1742                     <field name="days2"/>
1743                 </tree>
1744             </field>
1745         </record>
1746
1747
1748         <record id="view_payment_term_line_form" model="ir.ui.view">
1749             <field name="name">account.payment.term.line.form</field>
1750             <field name="model">account.payment.term.line</field>
1751             <field name="type">form</field>
1752             <field name="arch" type="xml">
1753                 <form string="Payment Term">
1754                     <group>
1755                         <group colspan="2" col="4">
1756                             <field name="name" select="1"/>
1757                             <separator string="Amount Computation" colspan="4"/>
1758                             <field name="value" colspan="4"/>
1759                             <field name="value_amount" colspan="4" attrs="{'readonly':[('value','=','balance')]}"/>
1760                         </group>
1761                         <group colspan="2" col="4">
1762                             <field name="sequence"/>
1763                             <separator string="Due Date Computation" colspan="4"/>
1764                             <field name="days" colspan="4"/>
1765                             <field name="days2" colspan="4"/>
1766                         </group>
1767                     </group>
1768                     <newline/>
1769                     <separator string="Example" colspan="4"/>
1770                     <label string="At 14 net days 2 percent, remaining amount at 30 days end of month." colspan="4"/>
1771                     <group colspan="2" col="2">
1772                         <label string="Line 1:" colspan="2"/>
1773                         <label string="  Valuation: Percent"/>
1774                         <label string="  Number of Days: 14"/>
1775                         <label string="  Value amount: 0.02"/>
1776                         <label string="  Day of the Month: 0"/>
1777                     </group>
1778                     <newline/>
1779                     <group colspan="2" col="2">
1780                         <label string="Line 2:" colspan="2"/>
1781                         <label string="  Valuation: Balance"/>
1782                         <label string="  Number of Days: 30"/>
1783                         <label string="  Value amount: n.a"/>
1784                         <label string="  Day of the Month= -1"/>
1785                     </group>
1786                 </form>
1787             </field>
1788         </record>
1789
1790         <record id="view_payment_term_search" model="ir.ui.view">
1791             <field name="name">account.payment.term.search</field>
1792             <field name="model">account.payment.term</field>
1793             <field name="type">search</field>
1794             <field name="arch" type="xml">
1795                 <search string="Payment Term">
1796                     <field name="name"/>
1797                     <field name="active"/>
1798                 </search>
1799             </field>
1800         </record>
1801
1802         <record id="view_payment_term_form" model="ir.ui.view">
1803             <field name="name">account.payment.term.form</field>
1804             <field name="model">account.payment.term</field>
1805             <field name="type">form</field>
1806             <field name="arch" type="xml">
1807                 <form string="Payment Term">
1808                     <separator colspan="4" string="Information"/>
1809                     <field name="name" select="1"/>
1810                     <field name="active" select="1"/>
1811                     <separator colspan="4" string="Description On Invoices"/>
1812                     <field colspan="4" name="note" nolabel="1"/>
1813                     <separator colspan="4" string="Computation"/>
1814                     <field colspan="4" name="line_ids" nolabel="1"/>
1815                 </form>
1816             </field>
1817         </record>
1818
1819         <record id="action_payment_term_form" model="ir.actions.act_window">
1820             <field name="name">Payment Terms</field>
1821             <field name="res_model">account.payment.term</field>
1822             <field name="view_type">form</field>
1823             <field name="view_mode">tree,form</field>
1824             <field name="search_view_id" ref="view_payment_term_search"/>
1825         </record>
1826         <menuitem action="action_payment_term_form"
1827             id="menu_action_payment_term_form" parent="menu_configuration_misc"/>
1828
1829         <!--
1830         # Account Subscriptions
1831         -->
1832
1833         <record id="view_subscription_line_form" model="ir.ui.view">
1834             <field name="name">account.subscription.line.form</field>
1835             <field name="model">account.subscription.line</field>
1836             <field name="type">form</field>
1837             <field name="arch" type="xml">
1838                 <form string="Subscription lines">
1839                     <field name="date"/>
1840                     <field name="move_id"/>
1841                 </form>
1842             </field>
1843         </record>
1844
1845         <record id="view_subscription_line_tree" model="ir.ui.view">
1846             <field name="name">account.subscription.line.tree</field>
1847             <field name="model">account.subscription.line</field>
1848             <field name="type">tree</field>
1849             <field name="arch" type="xml">
1850                 <tree string="Subscription lines">
1851                     <field name="date"/>
1852                     <field name="move_id"/>
1853                 </tree>
1854             </field>
1855         </record>
1856
1857         <record id="view_subscription_tree" model="ir.ui.view">
1858             <field name="name">account.subscription.tree</field>
1859             <field name="model">account.subscription</field>
1860             <field name="type">tree</field>
1861             <field name="arch" type="xml">
1862                 <tree colors="blue:state == 'draft';gray:state == 'done';black:state == 'running'" string="Entry Subscription">
1863                     <field name="name"/>
1864                     <field name="model_id"/>
1865                     <field name="ref"/>
1866                     <field name="date_start"/>
1867                     <field name="state"/>
1868                 </tree>
1869             </field>
1870         </record>
1871
1872          <record id="view_subscription_search" model="ir.ui.view">
1873             <field name="name">account.subscription.search</field>
1874             <field name="model">account.subscription</field>
1875             <field name="type">search</field>
1876             <field name="arch" type="xml">
1877                 <search string="Entry Subscription">
1878                     <group>
1879                         <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Subscription"/>
1880                         <filter icon="terp-camera_test" string="Running" domain="[('state','=','running')]" help="Running Subscription"/>
1881                         <separator orientation="vertical"/>
1882                         <field name="name"/>
1883                         <field name="model_id"/>
1884                         <field name="date_start"/>
1885                     </group>
1886                     <newline/>
1887                     <group expand="0" string="Group By...">
1888                         <filter string="Model" icon="terp-folder-orange" domain="[]" context="{'group_by':'model_id'}"/>
1889                         <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
1890                     </group>
1891                 </search>
1892             </field>
1893         </record>
1894
1895         <record id="view_subscription_form" model="ir.ui.view">
1896             <field name="name">account.subscription.form</field>
1897             <field name="model">account.subscription</field>
1898             <field name="type">form</field>
1899             <field name="arch" type="xml">
1900                 <form string="Recurring">
1901                     <group col="6" colspan="4">
1902                         <field name="name" select="1"/>
1903                         <field name="model_id"/>
1904                         <field name="ref" select="1"/>
1905                     </group>
1906                     <group col="2" colspan="2">
1907                         <separator colspan="4" string="Starts on"/>
1908                         <field name="date_start" select="1"/>
1909                         <field name="period_total"/>
1910                     </group>
1911
1912                     <group col="2" colspan="2">
1913                         <separator colspan="4" string="Valid Up to"/>
1914                         <field name="period_nbr"/>
1915                         <field name="period_type"/>
1916                     </group>
1917
1918                     <group col="2" colspan="2">
1919                     </group>
1920                     <separator colspan="4" string="Subscription Lines"/>
1921                     <field colspan="4" name="lines_id" widget="one2many_list" nolabel="1"/>
1922
1923                     <group col="6" colspan="4">
1924                         <field name="state"/>
1925                         <button name="state_draft" states="done" string="Set to Draft" type="object"  icon="gtk-convert" />
1926                         <button name="compute" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
1927                         <button name="remove_line" states="running" string="Remove Lines" type="object" icon="gtk-remove"/>
1928                     </group>
1929                 </form>
1930             </field>
1931         </record>
1932         <record id="action_subscription_form" model="ir.actions.act_window">
1933             <field name="name">Recurring Lines</field>
1934             <field name="res_model">account.subscription</field>
1935             <field name="view_type">form</field>
1936             <field name="view_mode">tree,form</field>
1937             <field name="search_view_id" ref="view_subscription_search"/>
1938             <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>
1939         </record>
1940         <menuitem
1941             name="Define Recurring Entries" action="action_subscription_form"
1942             groups="base.group_extended"
1943             id="menu_action_subscription_form" sequence="1"
1944             parent="account.menu_finance_recurrent_entries"/>
1945
1946         <record id="action_subscription_form_running" model="ir.actions.act_window">
1947             <field name="name">Running Subscriptions</field>
1948             <field name="res_model">account.subscription</field>
1949             <field name="view_type">form</field>
1950             <field name="view_mode">tree,form</field>
1951             <field name="domain">[('state','=','running')]</field>
1952             <field name="filter" eval="True"/>
1953         </record>
1954
1955         <record id="action_subscription_form_new" model="ir.actions.act_window">
1956             <field name="name">New Subscription</field>
1957             <field name="res_model">account.subscription</field>
1958             <field name="view_type">form</field>
1959             <field name="view_mode">form,tree</field>
1960             <field name="view_id" ref="view_subscription_form"/>
1961         </record>
1962
1963         <record id="view_subscription_line_form_complete" model="ir.ui.view">
1964             <field name="name">account.subscription.line.form</field>
1965             <field name="model">account.subscription.line</field>
1966             <field name="type">form</field>
1967             <field eval="20" name="priority"/>
1968             <field name="arch" type="xml">
1969                 <form string="Subscription lines">
1970                     <field name="subscription_id"/>
1971                     <field name="date"/>
1972                     <field name="move_id"/>
1973                 </form>
1974             </field>
1975         </record>
1976
1977         <record id="action_move_line_tree1" model="ir.actions.act_window">
1978             <field name="name">Journal Items</field>
1979             <field name="res_model">account.move.line</field>
1980             <field name="view_type">form</field>
1981             <field name="view_mode">tree,form</field>
1982             <field name="domain">[('account_id','child_of', [active_id]),('state','&lt;&gt;','draft')]</field>
1983             <field name="context">{'account_id':active_id}</field>
1984         </record>
1985
1986         <record id="view_move_line_tax_tree" model="ir.ui.view">
1987             <field name="name">account.move.line.tax.tree</field>
1988             <field name="model">account.move.line</field>
1989             <field name="type">tree</field>
1990             <field eval="4" name="priority"/>
1991             <field name="arch" type="xml">
1992                 <tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items">
1993                     <field name="date"/>
1994                     <field name="move_id"/>
1995                     <field name="statement_id" string="St."/>
1996                     <field name="name"/>
1997                     <field name="partner_id"/>
1998                     <field name="account_id"/>
1999                     <field name="tax_code_id"/>
2000                     <field name="tax_amount"/>
2001                     <field name="debit" sum="Total debit"/>
2002                     <field name="credit" sum="Total credit"/>
2003                     <field name="account_tax_id"/>
2004                     <field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="analytic.group_analytic_accounting"/>
2005                     <field name="state"/>
2006                 </tree>
2007             </field>
2008         </record>
2009
2010         <record id="action_tax_code_line_open" model="ir.actions.act_window">
2011             <field name="name">Journal Items</field>
2012             <field name="res_model">account.move.line</field>
2013             <field name="view_type">form</field>
2014             <field name="view_mode">tree,form</field>
2015             <field name="view_id" ref="view_move_line_tax_tree"/>
2016             <field name="domain">[('tax_code_id','child_of',active_id),('state','&lt;&gt;','draft')]</field>
2017         </record>
2018         <record id="ir_open_tax_move_line" model="ir.values">
2019             <field name="key2">tree_but_open</field>
2020             <field name="model">account.tax.code</field>
2021             <field name="name">Tax Details</field>
2022             <field eval="'ir.actions.act_window,%d'%action_tax_code_line_open" name="value"/>
2023         </record>
2024
2025
2026         <!--
2027     # Admin config
2028     -->
2029
2030         <act_window
2031            id="act_account_journal_2_account_bank_statement"
2032            name="Bank statements"
2033            context="{'search_default_journal_id': active_id, 'default_journal_id': active_id}"
2034            res_model="account.bank.statement"
2035            src_model="account.journal"/>
2036
2037         <act_window
2038            id="act_account_journal_2_account_move_line"
2039            name="Journal Items"
2040            context="{'search_default_journal_id':active_id, 'default_journal_id': active_id}"
2041            res_model="account.move.line"
2042            src_model="account.journal"/>
2043
2044         <act_window
2045             context="{'search_default_reconcile_id':False, 'search_default_partner_id':[active_id], 'default_partner_id': active_id}"
2046             domain="[('account_id.reconcile', '=', True),('account_id.type', 'in', ['receivable', 'payable'])]"
2047             id="act_account_partner_account_move_all"
2048             name="Receivables &amp; Payables"
2049             res_model="account.move.line"
2050             src_model="res.partner"
2051             groups="base.group_extended"/>
2052
2053         <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"/>
2054
2055         <record id="view_account_addtmpl_wizard_form" model="ir.ui.view">
2056             <field name="name">Create Account</field>
2057             <field name="model">account.addtmpl.wizard</field>
2058             <field name="type">form</field>
2059             <field name="arch" type="xml">
2060                 <form string="Create Account">
2061                     <separator col="4" colspan="4" string="Create an Account based on this template"/>
2062                     <field name="cparent_id"/>
2063                     <newline/>
2064                     <group col="2" colspan="2">
2065                         <button icon="gtk-cancel" special="cancel" string="Cancel" name="action_cancel" type="object"/>
2066                         <button icon="gtk-ok" name="action_create" string="Add" type="object"/>
2067                     </group>
2068                 </form>
2069             </field>
2070         </record>
2071
2072         <act_window domain="[]" id="action_account_addtmpl_wizard_form"
2073             name="Create Account"
2074             target="new"
2075             res_model="account.addtmpl.wizard"
2076             context="{'tmpl_ids': active_id}"
2077             src_model="account.account.template"
2078             view_type="form" view_mode="form"/>
2079
2080         <!-- Account Templates -->
2081         <menuitem
2082             id="account_template_folder"
2083             name="Templates"
2084             parent="menu_finance_accounting"
2085             groups="base.group_multi_company"/>
2086         <menuitem
2087             id="account_template_taxes"
2088             name="Taxes"
2089             parent="account_template_folder"
2090             sequence="2"/>
2091         <menuitem
2092             id="account_template_accounts"
2093             name="Accounts"
2094             parent="account_template_folder"
2095             sequence="1"/>
2096
2097
2098         <record id="view_account_template_form" model="ir.ui.view">
2099             <field name="name">account.account.template.form</field>
2100             <field name="model">account.account.template</field>
2101             <field name="type">form</field>
2102             <field name="arch" type="xml">
2103                 <form string="Account Template">
2104                     <notebook>
2105                         <page string="General Information">
2106                             <field name="name"/>
2107                             <field name="code"/>
2108                             <newline/>
2109                             <field name="parent_id"/>
2110                             <field name="shortcut"/>
2111                             <field name="type"/>
2112                             <field name="user_type"/>
2113
2114                             <field name="currency_id"/>
2115                             <field name="reconcile"/>
2116                             <field name="chart_template_id"/>
2117                             <separator string="Default taxes" colspan="4"/>
2118                             <field name="tax_ids" colspan="4" nolabel="1"/>
2119                         </page>
2120                         <page string="Notes">
2121                             <field colspan="4" name="note" nolabel="1"/>
2122                         </page>
2123                     </notebook>
2124                 </form>
2125             </field>
2126         </record>
2127
2128         <record id="view_account_template_tree" model="ir.ui.view">
2129             <field name="name">account.account.template.tree</field>
2130             <field name="model">account.account.template</field>
2131             <field name="type">tree</field>
2132             <field name="arch" type="xml">
2133                 <tree string="Account Template">
2134                     <field name="code"/>
2135                     <field name="name"/>
2136                     <field name="type" invisible="1"/>
2137                     <field name="user_type" invisible="1"/>
2138                 </tree>
2139             </field>
2140         </record>
2141
2142         <record id="view_account_template_search" model="ir.ui.view">
2143             <field name="name">account.account.template.search</field>
2144             <field name="model">account.account.template</field>
2145             <field name="type">search</field>
2146             <field name="arch" type="xml">
2147                 <search string="Search Account Templates">
2148                     <group>
2149                         <filter icon="terp-sale" string="Receivale Accounts" domain="[('type','=','receivable')]"/>
2150                          <filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
2151                          <separator orientation="vertical"/>
2152                         <field name="code"/>
2153                         <field name="name"/>
2154                         <field name="parent_id"/>
2155                         <field name="type"/>
2156                         <field name="user_type"/>
2157                     </group>
2158                     <newline/>
2159                     <group expand="0" string="Group By...">
2160                         <filter string="Internal Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
2161                         <filter string="Account Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'user_type'}"/>
2162                    </group>
2163                 </search>
2164             </field>
2165         </record>
2166
2167         <record id="action_account_template_form" model="ir.actions.act_window">
2168             <field name="name">Account Templates</field>
2169             <field name="res_model">account.account.template</field>
2170             <field name="view_type">form</field>
2171             <field name="view_mode">tree,form</field>
2172             <field name="search_view_id" ref="view_account_template_search"/>
2173         </record>
2174
2175         <menuitem action="action_account_template_form" id="menu_action_account_template_form" parent="account_template_accounts"/>
2176
2177         <!-- Chart of Accounts Templates -->
2178
2179         <record id="view_account_chart_template_form" model="ir.ui.view">
2180             <field name="name">account.chart.template.form</field>
2181             <field name="model">account.chart.template</field>
2182             <field name="type">form</field>
2183             <field name="arch" type="xml">
2184                 <form string="Chart of Accounts Template">
2185                     <group>
2186                     <field name="name"/>
2187                     <field name="account_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
2188                     <field name="bank_account_view_id" attrs="{'required': [('parent_id', '=', False)]}"/>
2189                     <field name="tax_code_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
2190                     <field name="parent_id" />
2191                     <!--<field name="code_digits" />-->
2192                     <field name="visible" />
2193                     <field name="complete_tax_set" />
2194                     </group>
2195                     <field name="tax_template_ids" colspan="4" readonly="1" nolabel="1"/>
2196                     <separator string="Properties" colspan="4"/>
2197                     <group>
2198                     <field name="property_account_receivable" domain="[('id', 'child_of', [account_root_id])]"/>
2199                     <field name="property_account_payable" domain="[('id', 'child_of', [account_root_id])]"/>
2200                     <field name="property_account_expense_categ" domain="[('id', 'child_of', [account_root_id])]"/>
2201                     <field name="property_account_income_categ" domain="[('id', 'child_of', [account_root_id])]" />
2202                     <field name="property_account_expense" domain="[('id', 'child_of', [account_root_id])]"/>
2203                     <field name="property_account_income" domain="[('id', 'child_of', [account_root_id])]"/>
2204                     <field name="property_account_income_opening" domain="[('id', 'child_of', [account_root_id])]"/>
2205                     <field name="property_account_expense_opening" domain="[('id', 'child_of', [account_root_id])]"/>
2206                     <field name="property_reserve_and_surplus_account" />
2207                     </group>
2208                 </form>
2209             </field>
2210         </record>
2211         <record id="view_account_chart_template_seacrh" model="ir.ui.view">
2212             <field name="name">account.chart.template.search</field>
2213             <field name="model">account.chart.template</field>
2214             <field name="type">search</field>
2215             <field name="arch" type="xml">
2216                 <search string="Search Chart of Account Templates">
2217                       <group>
2218                           <field name="name"/>
2219                         <field name="account_root_id"/>
2220                         <field name="bank_account_view_id"/>
2221                       </group>
2222                       <newline/>
2223                       <group expand="0" string="Group By...">
2224                         <filter string="Root Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'account_root_id'}"/>
2225                         <filter string="Bank Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'bank_account_view_id'}"/>
2226                         <separator orientation="vertical"/>
2227                         <filter string="Receivable Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_receivable'}"/>
2228                         <filter string="Payable Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_payable'}"/>
2229                         <separator orientation="vertical"/>
2230                         <filter string="Income Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_income_categ'}"/>
2231                         <filter string="Expense Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_expense_categ'}"/>
2232                       </group>
2233                 </search>
2234             </field>
2235         </record>
2236         <record id="view_account_chart_template_tree" model="ir.ui.view">
2237             <field name="name">account.chart.template.tree</field>
2238             <field name="model">account.chart.template</field>
2239             <field name="type">tree</field>
2240             <field name="arch" type="xml">
2241                 <tree string="Chart of Accounts Template">
2242                     <field name="name"/>
2243                     <field name="account_root_id"/>
2244                     <field name="tax_code_root_id"/>
2245                     <field name="bank_account_view_id"/>
2246                     <field name="property_account_receivable" invisible="1"/>
2247                     <field name="property_account_payable" invisible="1"/>
2248                     <field name="property_account_expense_categ" invisible="1"/>
2249                     <field name="property_account_income_categ" invisible="1"/>
2250                 </tree>
2251             </field>
2252         </record>
2253         <record id="action_account_chart_template_form" model="ir.actions.act_window">
2254             <field name="name">Chart of Accounts Templates</field>
2255             <field name="res_model">account.chart.template</field>
2256             <field name="view_type">form</field>
2257             <field name="view_mode">tree,form</field>
2258         </record>
2259
2260         <menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_accounts" sequence="1"/>
2261
2262         <!-- Account Tax Templates -->
2263
2264         <record id="view_account_tax_template_form" model="ir.ui.view">
2265             <field name="name">account.tax.template.form</field>
2266             <field name="model">account.tax.template</field>
2267             <field name="type">form</field>
2268             <field name="arch" type="xml">
2269                 <form string="Account Tax Template">
2270                     <group colspan="4">
2271                         <field name="name"/>
2272                         <field name="description"/>
2273                         <newline/>
2274                         <field name="chart_template_id"/>
2275                         <field name="type"/>
2276                         <field name="type_tax_use"/>
2277                         <group colspan="2" col="4">
2278                             <field name="price_include"/>
2279                         </group>
2280                     </group>
2281                     <notebook colspan="4">
2282                         <page string="Tax Definition">
2283                             <field name="applicable_type"/>
2284                             <field name="amount" attrs="{'readonly':[('type','=','none'),('type','=','code')]}"/>
2285                             <field groups="base.group_extended" name="include_base_amount"/>
2286                             <field groups="base.group_extended" name="domain"/>
2287                             <newline/>
2288                             <field name="account_collected_id"/>
2289                             <label colspan="2" nolabel="1" string="Keep empty to use the income account"/>
2290                             <field name="account_paid_id"/>
2291                             <label colspan="2" nolabel="1" string="Keep empty to use the expense account"/>
2292                             <field groups="base.group_extended" name="child_depend"/>
2293                             <field groups="base.group_extended" name="sequence"/>
2294                         </page>
2295                         <page string="Tax Declaration">
2296                             <separator colspan="4" string="Invoices"/>
2297                             <field name="base_code_id"/>
2298                             <field name="base_sign"/>
2299                             <field name="tax_code_id"/>
2300                             <field name="tax_sign"/>
2301
2302                             <separator colspan="4" string="Credit Notes"/>
2303                             <field name="ref_base_code_id"/>
2304                             <field name="ref_base_sign"/>
2305                             <field name="ref_tax_code_id"/>
2306                             <field name="ref_tax_sign"/>
2307                         </page>
2308                         <page groups="base.group_extended" string="Special Computation">
2309                             <separator colspan="4" string="Compute Code (if type=code)"/>
2310                             <field colspan="4" name="python_compute" nolabel="1" attrs="{'readonly':[('type','!=','code')]}"/>
2311                             <separator colspan="4" string="Compute Code for Taxes included prices"/>
2312                             <field colspan="4" name="python_compute_inv" nolabel="1"/>
2313                             <separator colspan="4" string="Applicable Code (if type=code)"/>
2314                             <field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')]}"/>
2315                         </page>
2316                     </notebook>
2317                 </form>
2318             </field>
2319         </record>
2320         <record id="view_account_tax_template_tree" model="ir.ui.view">
2321             <field name="name">account.tax.template.tree</field>
2322             <field name="model">account.tax.template</field>
2323             <field name="type">tree</field>
2324             <field name="arch" type="xml">
2325                 <tree string="Account Tax Template">
2326                     <field name="name" />
2327                     <field name="description"/>
2328                 </tree>
2329             </field>
2330         </record>
2331         <record id="view_account_tax_template_search" model="ir.ui.view">
2332             <field name="name">account.tax.template.search</field>
2333             <field name="model">account.tax.template</field>
2334             <field name="type">search</field>
2335             <field name="arch" type="xml">
2336                 <search string="Search Tax Templates">
2337                     <group>
2338                         <filter icon="terp-sale" string="Sale" domain="[('type_tax_use','=','sale')]" help="Taxes used in Sales"/>
2339                         <filter icon="terp-purchase" string="Purchase" domain="[('type_tax_use','=','purchase')]" help="Taxes used in Purchases"/>
2340                         <separator orientation="vertical"/>
2341                         <field name="name"/>
2342                         <field name="description"/>
2343                         <field name="chart_template_id"/>
2344                     </group>
2345                 </search>
2346             </field>
2347         </record>
2348
2349         <record id="action_account_tax_template_form" model="ir.actions.act_window">
2350             <field name="name">Tax Templates</field>
2351             <field name="res_model">account.tax.template</field>
2352             <field name="view_type">form</field>
2353             <field name="view_mode">tree,form</field>
2354             <field name="search_view_id" ref="view_account_tax_template_search"/>
2355         </record>
2356
2357         <menuitem action="action_account_tax_template_form" id="menu_action_account_tax_template_form" parent="account_template_taxes" sequence="13"/>
2358
2359         <!-- Account Tax Code Templates -->
2360         <record id="view_tax_code_template_tree" model="ir.ui.view">
2361             <field name="name">account.tax.code.template.tree</field>
2362             <field name="model">account.tax.code.template</field>
2363             <field name="type">tree</field>
2364             <field name="field_parent">child_ids</field>
2365             <field name="arch" type="xml">
2366                 <tree string="Account Tax Code Template" toolbar="1">
2367                     <field name="name"/>
2368                     <field name="code"/>
2369                     <field name="parent_id" invisible="1"/>
2370                 </tree>
2371             </field>
2372         </record>
2373
2374         <record id="view_tax_code_template_search" model="ir.ui.view">
2375             <field name="name">account.tax.code.template.search</field>
2376             <field name="model">account.tax.code.template</field>
2377             <field name="type">search</field>
2378             <field name="arch" type="xml">
2379                 <search string="Search tax template">
2380                     <group>
2381                         <field name="name"/>
2382                         <field name="code"/>
2383                         <field name="parent_id"/>
2384                     </group>
2385                     <newline/>
2386                     <group expand="0" string="Group By...">
2387                         <filter string="Parent Code" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
2388                     </group>
2389                 </search>
2390             </field>
2391         </record>
2392
2393         <record id="view_tax_code_template_form" model="ir.ui.view">
2394             <field name="name">account.tax.code.template.form</field>
2395             <field name="model">account.tax.code.template</field>
2396             <field name="type">form</field>
2397             <field name="arch" type="xml">
2398                 <form string="Account Tax Code Template">
2399                     <field name="name" select="1"/>
2400                     <field name="code" select="1"/>
2401                     <field name="parent_id" select="1"/>
2402                     <field name="sign"/>
2403                     <newline/>
2404                     <separator string="Description" colspan="4"/>
2405                     <field colspan="4" name="info" nolabel="1"/>
2406                 </form>
2407             </field>
2408         </record>
2409
2410         <record id="action_account_tax_code_template_form" model="ir.actions.act_window">
2411             <field name="name">Tax Code Templates</field>
2412             <field name="res_model">account.tax.code.template</field>
2413             <field name="view_type">form</field>
2414             <field name="view_mode">tree,form</field>
2415             <field name="search_view_id" ref="view_tax_code_template_search"/>
2416         </record>
2417         <menuitem action="action_account_tax_code_template_form" id="menu_action_account_tax_code_template_form" parent="account_template_taxes" sequence="14"/>
2418
2419
2420         <!--  Wizard for Multi Charts of Accounts -->
2421
2422         <record id="view_wizard_multi_chart" model="ir.ui.view">
2423             <field name="name">Generate Chart of Accounts from a Chart Template</field>
2424             <field name="model">wizard.multi.charts.accounts</field>
2425             <field name="type">form</field>
2426             <field name="inherit_id" ref="base.res_config_view_base"/>
2427             <field name="arch" type="xml">
2428               <data>
2429                 <form position="attributes">
2430                   <attribute name="string">Accounting Application Configuration</attribute>
2431                 </form>
2432                 <separator string="title" position="attributes">
2433                 <attribute name="string">Generate Your Chart of Accounts from a Chart Template</attribute>
2434                   </separator>
2435                   <xpath expr="//label[@string='description']" position="attributes">
2436                     <attribute name="string">This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template</attribute>
2437                     <attribute name="width">150</attribute>
2438                   </xpath>
2439                   <xpath expr='//separator[@string="vsep"]' position='attributes'>
2440                           <attribute name='rowspan'>15</attribute>
2441                           <attribute name='string'></attribute>
2442                   </xpath>
2443                 <group string="res_config_contents" position="replace">
2444                     <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 -->
2445                     <field name ="code_digits" groups="account.group_account_user"/>
2446                     <field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
2447                     <field name ="seq_journal" groups="base.group_extended"/>
2448                     <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'))]"/>
2449                     <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'))]"/>
2450                     <newline/>
2451                     <field name ="sale_tax_rate" attrs="{'invisible': [('complete_tax_set', '=', True)]}" on_change="onchange_tax_rate(sale_tax_rate)"/>
2452                     <field name ="purchase_tax_rate" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>
2453                     <field name ="complete_tax_set" invisible="1"/>
2454                     <newline/> <!-- extended view because the web UI is not good for one2many -->
2455                     <field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list" groups="account.group_account_user">
2456                         <form string="Bank Information">
2457                             <field name="acc_name"/>
2458                             <field name="account_type"/>
2459                             <field name="currency_id" widget="selection" groups="base.group_extended"/>
2460                         </form>
2461                         <tree editable="bottom" string="Bank Information">
2462                             <field name="acc_name"/>
2463                             <field name="account_type"/>
2464                             <field name="currency_id" widget="selection" groups="base.group_extended"/>
2465                         </tree>
2466                     </field>
2467                 </group>
2468               </data>
2469             </field>
2470         </record>
2471
2472         <record id="action_wizard_multi_chart" model="ir.actions.act_window">
2473             <field name="name">Generate Chart of Accounts from a Chart Template</field>
2474             <field name="type">ir.actions.act_window</field>
2475             <field name="res_model">wizard.multi.charts.accounts</field>
2476             <field name="view_id" ref="view_wizard_multi_chart"/>
2477             <field name="view_type">form</field>
2478             <field name="view_mode">form</field>
2479             <field name="target">new</field>
2480         </record>
2481         <record id="ir_actions_server_action_wizard_multi_chart" model="ir.actions.server">
2482             <field name="type">ir.actions.server</field>
2483             <field name="condition">True</field>
2484             <field name="state">code</field>
2485             <field name="model_id" ref="base.model_ir_actions_todo"/>
2486             <field eval="5" name="sequence"/>
2487             <field name="code">
2488 # check for unconfigured companies
2489 account_installer_obj = self.pool.get('account.installer')
2490 account_installer_obj.check_unconfigured_cmp(cr, uid, context=context)
2491 action_ids = []
2492 # fetch the act_window actions related to chart of account configuration
2493 # we use ir.actions.todo to enable the possibility for other modules to insert their own
2494 # wizards during the configuration process
2495 ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'action_wizard_multi_chart')
2496 if ref:
2497     action_ids += [ref[1]]
2498 ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'action_account_configuration_installer')
2499 if ref:
2500     action_ids += [ref[1]]
2501 todo_ids = pool.get('ir.actions.todo').search(cr, uid, [('action_id', 'in', action_ids)], context=context)
2502 pool.get('ir.actions.todo').write(cr, uid, todo_ids, {'state':'open'}, context=context)
2503 action = pool.get('res.config').next(cr, uid, [], context)
2504 </field>
2505            <field name="name">New Company Financial Setting</field>
2506         </record>
2507
2508
2509         <record id="menu_act_ir_actions_bleble" model="ir.ui.menu">
2510             <field name="name">New Company Financial Setting</field>
2511             <field eval="1" name="sequence"/>
2512             <field name="parent_id" ref="account.menu_finance_accounting"/>
2513             <field name="icon">STOCK_EXECUTE</field>
2514             <field name="action" ref="ir_actions_server_action_wizard_multi_chart"/>
2515         </record>
2516
2517         <record id="account_account_graph" model="ir.ui.view">
2518             <field name="name">account.account.graph</field>
2519             <field name="model">account.account</field>
2520             <field name="type">graph</field>
2521             <field name="arch" type="xml">
2522                 <graph string="Account Statistics" type="bar">
2523                     <field name="name"/>
2524                     <field name="balance" operator="+"/>
2525                 </graph>
2526             </field>
2527          </record>
2528
2529          <!-- Fiscal Position Templates -->
2530
2531         <record id="view_account_position_template_search" model="ir.ui.view">
2532             <field name="name">account.fiscal.position.template.search</field>
2533             <field name="model">account.fiscal.position.template</field>
2534             <field name="type">search</field>
2535             <field name="arch" type="xml">
2536                 <search string="Fiscal Position">
2537                     <field name="name"/>
2538                 </search>
2539             </field>
2540         </record>
2541
2542         <record id="view_account_position_template_form" model="ir.ui.view">
2543             <field name="name">account.fiscal.position.template.form</field>
2544             <field name="model">account.fiscal.position.template</field>
2545             <field name="type">form</field>
2546             <field name="arch" type="xml">
2547                 <form string="Fiscal Position Template">
2548                     <field name="name"/>
2549                     <field name="chart_template_id"/>
2550                     <newline/>
2551                     <field name="tax_ids" colspan="4" nolabel="1">
2552                         <tree string="Taxes Mapping" editable="bottom">
2553                             <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
2554                             <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
2555                         </tree>
2556                         <form string="Taxes Mapping">
2557                             <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
2558                             <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
2559                         </form>
2560                     </field>
2561                     <field name="account_ids" colspan="4" nolabel="1">
2562                         <tree string="Accounts Mapping" editable="bottom">
2563                             <field name="account_src_id"/>
2564                             <field name="account_dest_id"/>
2565                         </tree>
2566                         <form string="Accounts Mapping">
2567                             <field name="account_src_id"/>
2568                             <field name="account_dest_id"/>
2569                         </form>
2570                     </field>
2571                 </form>
2572             </field>
2573         </record>
2574         <record id="view_account_position_template_tree" model="ir.ui.view">
2575             <field name="name">account.fiscal.position.template.tree</field>
2576             <field name="model">account.fiscal.position.template</field>
2577             <field name="type">tree</field>
2578             <field name="arch" type="xml">
2579                 <tree string="Fiscal Position">
2580                     <field name="name"/>
2581                 </tree>
2582             </field>
2583         </record>
2584
2585         <record id="action_account_fiscal_position_template_form" model="ir.actions.act_window">
2586             <field name="name">Fiscal Position Templates</field>
2587             <field name="res_model">account.fiscal.position.template</field>
2588             <field name="view_type">form</field>
2589             <field name="view_mode">tree,form</field>
2590             <field name="search_view_id" ref="view_account_position_template_search"/>
2591         </record>
2592
2593         <menuitem
2594             action="action_account_fiscal_position_template_form"
2595             id="menu_action_account_fiscal_position_form_template"
2596             parent="account_template_taxes" sequence="20"/>
2597
2598         <!-- Cash Statement -->
2599         <record id="view_cash_statement_tree" model="ir.ui.view">
2600             <field name="name">account.bank.statement.tree</field>
2601             <field name="model">account.bank.statement</field>
2602             <field name="type">tree</field>
2603             <field name="arch" type="xml">
2604                 <tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end);black:state == 'open'" string="Statement">
2605                     <field name="name"/>
2606                     <field name="date"/>
2607                     <field name="period_id"/>
2608                     <field name="journal_id"/>
2609                     <field name="balance_start"/>
2610                     <field name="balance_end_real"/>
2611                     <field name="balance_end"/>
2612                     <field name="state"/>
2613                     <button type="object" string="Cancel" name="button_cancel" states="confirm" icon="gtk-cancel"/>
2614                     <button type="object" string="Open" name="button_open" states="draft" icon="terp-camera_test"/>
2615                     <button type="object" string="Confirm" name="button_confirm_bank" states="open" icon="terp-gtk-go-back-rtl"/>
2616                 </tree>
2617             </field>
2618         </record>
2619
2620         <record id="view_bank_statement_form2" model="ir.ui.view">
2621             <field name="name">account.bank.statement.form</field>
2622             <field name="model">account.bank.statement</field>
2623             <field name="type">form</field>
2624             <field name="arch" type="xml">
2625                 <form string="Statement">
2626                     <group col="6" colspan="4">
2627                         <field name="name" select="1"/>
2628                         <field name='company_id' widget="selection" groups="base.group_multi_company" />
2629                         <field name="journal_id" on_change="onchange_journal_id(journal_id)" select="1" widget="selection"/>
2630                         <field name="user_id" select="1" readonly="1"/>
2631                         <field name="period_id" select="1"/>
2632                         <field name="currency" invisible="1"/>
2633                     </group>
2634
2635                     <notebook colspan="4">
2636                         <page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
2637                             <field colspan="4" name="line_ids" nolabel="1" context="{'date':date}">
2638                                 <tree editable="bottom" string="Statement lines">
2639                                     <field name="sequence" invisible="1"/>
2640                                     <field name="date" groups="base.group_extended"/>
2641                                     <field name="name"/>
2642                                     <field name="ref"/>
2643                                     <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
2644                                     <field name="type" on_change="onchange_type(partner_id, type)"/>
2645                                     <field domain="[('journal_id','=',parent.journal_id), ('company_id', '=', parent.company_id)]" name="account_id"/>
2646                                     <field name="analytic_account_id" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]" groups="analytic.group_analytic_accounting" />
2647                                     <field name="amount"/>
2648                                 </tree>
2649                                 <form string="Statement lines">
2650                                     <field name="date"/>
2651                                     <field name="name"/>
2652                                     <field name="ref"/>
2653                                     <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
2654                                     <field name="type" on_change="onchange_type(partner_id, type)"/>
2655                                     <field domain="[('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view'), ('company_id', '=', parent.company_id)]" name="account_id"/>
2656                                     <field name="analytic_account_id" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]" groups="analytic.group_analytic_accounting" />
2657                                     <field name="amount"/>
2658                                     <field name="sequence"/>
2659                                     <separator colspan="4" string="Notes"/>
2660                                     <field colspan="4" name="note" nolabel="1"/>
2661                                 </form>
2662                             </field>
2663                         </page>
2664                         <page string="CashBox">
2665                             <group col="2" colspan="2" expand="1">
2666                                 <field name="starting_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','!=','draft')]}">
2667                                     <tree string = "Opening Balance" editable="bottom">
2668                                         <field name="pieces"/>
2669                                         <field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
2670                                         <field name="subtotal" sum="Total"/>
2671                                     </tree>
2672                                     <form string = "Opening Balance">
2673                                         <field name="pieces"/>
2674                                         <field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
2675                                         <field name="subtotal"/>
2676                                     </form>
2677                                 </field>
2678                             </group>
2679                             <group col="2" colspan="2" expand="1">
2680                                 <field name="ending_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','!=','open')]}">
2681                                     <tree string = "Closing Balance" editable="bottom">
2682                                         <field name="pieces"/>
2683                                         <field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
2684                                         <field name="subtotal" sum="Total"/>
2685                                     </tree>
2686                                     <form string = "Closing Balance">
2687                                         <field name="pieces"/>
2688                                         <field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
2689                                         <field name="subtotal"/>
2690                                     </form>
2691                                 </field>
2692                             </group>
2693                         </page>
2694                         <page string="Journal Entries" attrs="{'invisible': [('state','!=','confirm')]}">
2695                             <field colspan="4" name="move_line_ids" nolabel="1" string="Journal Entries"/>
2696                         </page>
2697                     </notebook>
2698                     <group col="6" colspan="4">
2699                         <group col="2" colspan="2">
2700                             <separator string="Dates" colspan="4"/>
2701                             <field name="date" select="1" attrs="{'readonly':[('state','!=','draft')]}"  on_change="onchange_date(date, company_id)"/>
2702                             <field name="closing_date" select="1" readonly="1"/>
2703                         </group>
2704                         <group col="2" colspan="2">
2705                             <separator string="Opening Balance" colspan="4"/>
2706                             <field name="balance_start" readonly="1" string="Opening Balance"/>
2707                             <field name="total_entry_encoding"/>
2708                         </group>
2709                         <group col="2" colspan="2">
2710                             <separator string="Closing Balance" colspan="4"/>
2711                             <field name="balance_end"/>
2712                             <field name="balance_end_cash"/>
2713                         </group>
2714                     </group>
2715                     <group col="8" colspan="4">
2716                         <field name="state" widget="statusbar" statusbar_visible="draft,confirm" colspan="4"/>
2717                         <button name="button_cancel" states="confirm,open" string="Cancel" icon="terp-gtk-stop" type="object" groups="base.group_extended"/>
2718                         <button name="button_confirm_cash" states="open" string="Close CashBox" icon="terp-dialog-close" type="object"/>
2719                         <button name="button_open" states="draft" string="Open CashBox" icon="gtk-go-forward" type="object"/>
2720                     </group>
2721                 </form>
2722             </field>
2723         </record>
2724         <record id="account_cash_statement_graph" model="ir.ui.view">
2725             <field name="name">account.bank.statement.graph</field>
2726             <field name="model">account.bank.statement</field>
2727             <field name="type">graph</field>
2728             <field name="arch" type="xml">
2729                 <graph string="Account Statistics" type="bar">
2730                     <field name="date"/>
2731                     <field name="balance_start" operator="+"/>
2732                     <field name="balance_end" operator="+"/>
2733                 </graph>
2734             </field>
2735          </record>
2736         <record id="action_view_bank_statement_tree" model="ir.actions.act_window">
2737             <field name="name">Cash Registers</field>
2738             <field name="type">ir.actions.act_window</field>
2739             <field name="res_model">account.bank.statement</field>
2740             <field name="view_type">form</field>
2741             <field name="view_mode">tree,form,graph</field>
2742             <field name="view_id" ref="view_cash_statement_tree"/>
2743             <field name="search_view_id" ref="view_account_bank_statement_filter"/>
2744             <field name="domain">[('journal_id.type', '=', 'cash')]</field>
2745             <field name="context">{'journal_type':'cash'}</field>
2746             <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>
2747         </record>
2748         <record model="ir.actions.act_window.view" id="act_cash_statement1_all">
2749             <field name="sequence" eval="1"/>
2750             <field name="view_mode">tree</field>
2751             <field name="view_id" ref="view_cash_statement_tree"/>
2752             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2753         </record>
2754         <record model="ir.actions.act_window.view" id="act_cash_statement2_all">
2755             <field name="sequence" eval="1"/>
2756             <field name="view_mode">form</field>
2757             <field name="view_id" ref="view_bank_statement_form2"/>
2758             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2759         </record>
2760         <record model="ir.actions.act_window.view" id="act_cash_statement3_all">
2761             <field name="sequence" eval="1"/>
2762             <field name="view_mode">graph</field>
2763             <field name="view_id" ref="account_cash_statement_graph"/>
2764             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2765         </record>
2766         <menuitem action="action_view_bank_statement_tree" id="journal_cash_move_lines"
2767             parent="menu_finance_bank_and_cash"/>
2768
2769         <menuitem id="menu_account_customer" name="Customers"
2770             parent="menu_finance_receivables"
2771             action="base.action_partner_customer_form" sequence="100"/>
2772
2773         <menuitem id="menu_account_supplier" name="Suppliers"
2774             parent="menu_finance_payables"
2775             action="base.action_partner_supplier_form" sequence="100"/>
2776
2777         <!--
2778             Account Reports
2779         -->
2780
2781         <record id="view_account_financial_report_form" model="ir.ui.view">
2782             <field name="name">account.financial.report.form</field>
2783             <field name="model">account.financial.report</field>
2784             <field name="type">form</field>
2785             <field name="arch" type="xml">
2786                 <form string="Account Report">
2787                     <group col="6" colspan="4">
2788                         <field name="name"/>
2789                         <field name="parent_id"/>
2790                         <field name="sequence"/>
2791                         <field name="type"/>
2792                         <field name="sign"/>
2793                         <field name="style_overwrite"/>
2794                     </group>
2795                     <notebook colspan="6">
2796                         <page string="Report">
2797                             <group colspan="4" col="4">
2798                                 <field name="display_detail" attrs="{'invisible': [('type','not in',['accounts','account_type'])]}"  colspan="2"/>
2799                                 <label string="" colspan="2"/>
2800                             </group>
2801                             <newline/>
2802                             <field name="account_ids" nolabel="1" colspan="6" attrs="{'invisible': [('type', '!=', 'accounts')]}"/>
2803                             <newline/>
2804                             <field name="account_report_id" attrs="{'invisible': [('type', '!=', 'account_report')]}"/>
2805                             <newline/>
2806                             <field name="account_type_ids" nolabel="1" attrs="{'invisible': [('type', '!=', 'account_type')]}"/>
2807                             <newline/>
2808                         </page>
2809                     </notebook>
2810                 </form>
2811             </field>
2812         </record>
2813
2814         <record id="view_account_financial_report_tree" model="ir.ui.view">
2815             <field name="name">account.financial.report.tree</field>
2816             <field name="model">account.financial.report</field>
2817             <field name="type">tree</field>
2818             <field name="arch" type="xml">
2819                 <tree string="Account Report">
2820                     <field name="name"/>
2821                     <field name="parent_id" invisible="1"/>
2822                     <field name="type"/>
2823                     <field name="account_report_id"/>
2824                 </tree>
2825             </field>
2826         </record>
2827
2828         <record id="view_account_financial_report_search" model="ir.ui.view">
2829             <field name="name">account.financial.report.search</field>
2830             <field name="model">account.financial.report</field>
2831             <field name="type">search</field>
2832             <field name="arch" type="xml">
2833                 <search string="Account Report">
2834                     <group>
2835                         <field name="name"/>
2836                         <field name="type"/>
2837                         <field name="account_report_id"/>
2838                     </group>
2839                     <newline/>
2840                     <group expand="0" string="Group By...">
2841                         <filter string="Parent Report" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
2842                         <separator orientation="vertical"/>
2843                         <filter string="Report Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
2844                     </group>
2845                 </search>
2846             </field>
2847         </record>
2848
2849         <record id="action_account_financial_report_tree" model="ir.actions.act_window">
2850             <field name="name">Financial Reports</field>
2851             <field name="type">ir.actions.act_window</field>
2852             <field name="res_model">account.financial.report</field>
2853             <field name="view_type">form</field>
2854             <field name="view_mode">tree,form</field>
2855             <field name="search_view_id" ref="view_account_financial_report_search"/>
2856             <field name="view_id" ref="view_account_financial_report_tree"/>
2857             <field name="help">Makes a generic system to draw financial reports easily.</field>
2858         </record>
2859
2860         <menuitem id="menu_account_financial_reports_tree" name="Account Reports" parent="menu_account_reports" action="action_account_financial_report_tree"/>
2861
2862         <record id="view_account_report_tree_hierarchy" model="ir.ui.view">
2863             <field name="name">account.report.hierarchy</field>
2864             <field name="model">account.financial.report</field>
2865             <field name="type">tree</field>
2866             <field name="field_parent">children_ids</field>
2867             <field name="arch" type="xml">
2868                 <tree string="Account Reports Hierarchy">
2869                     <field name="name"/>
2870                     <field name="type"/>
2871                     <field name="parent_id" invisible="1"/>
2872                     <field name="account_report_id"/>
2873                 </tree>
2874             </field>
2875         </record>
2876         <record id="action_account_report_tree_hierarchy" model="ir.actions.act_window">
2877             <field name="name">Financial Reports Hierarchy</field>
2878             <field name="res_model">account.financial.report</field>
2879             <field name="view_type">tree</field>
2880             <field name="view_id" ref="view_account_report_tree_hierarchy"/>
2881             <field name="domain">[('parent_id','=',False)]</field>
2882         </record>
2883
2884         <menuitem id="menu_account_report_tree_hierarchy" name="Account Reports Hierarchy"
2885                   parent="menu_account_reports" action="action_account_report_tree_hierarchy"/>
2886
2887     </data>
2888 </openerp>