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